Signature
stock argbreak(const text[], left[], leftlen, right[], rightlen){ new pos = argparse(text, 0, left, leftlen); if(pos == -1) { return -1; } new textlen = strlen(text); while(pos < textlen && isspace(text[pos])) { pos++; } copy(right, rightlen, text[pos]); return pos;}
Description
Emulates strbreak() using argparse().
Parameters
- text — Source input string.
- left — Buffer to store string left part.
- leftlen — Maximum length of the string part buffer.
- right — Buffer to store string right part.
- rightlen — Maximum length of the string part buffer.
Returns
-1 if no match was found; otherwise, an index into source
marking the first index after the searched text. The
index is always relative to the start of the input string.