Signature
stock split(const szInput[], szLeft[], pL_Max, szRight[], pR_Max, const szDelim[]){ new iEnd = contain(szInput, szDelim); new iStart = iEnd + strlen(szDelim); // If delimiter isnt in Input just split the string at max lengths if(iEnd == -1) { iStart = copy(szLeft, pL_Max, szInput); copy(szRight, pR_Max, szInput[iStart]); return; } // If delimter is in Input then split at input for max lengths if(pL_Max >= iEnd) copy(szLeft, iEnd, szInput); else copy(szLeft, pL_Max, szInput); copy(szRight, pR_Max, szInput[iStart]);}
Description
It is basically strbreak but you have a delimiter that is more than one character in length. By Suicid3.
Parameters
- szInput — Source input string.
- szLeft — Buffer to store left string part.
- pL_Max — Maximum length of the string part buffer.
- szRight — Buffer to store right string part.
- pR_Max — Maximum length of the string part buffer.
- szDelim — A string which specifies a search point to break at.
No return value