BreakString Function

Finds the first "argument" in a string; either a set of space terminated characters, or a fully quoted string. After the argument is found, whitespace is read until the next portion of the string is reached. If nothing remains, -1 is returned. Otherwise, the index to the first character is returned.

int BreakString(const char[] source, char[] arg, int argLen)

Parameters

const char[] source

Source input string.

char[] arg

Stores argument read from string.

int argLen

Maximum length of argument buffer.

Return Value

Index to next piece of string, or -1 if none.