PullNextToken() retrieves the next token from a string. Finds the first instance of any of the characters in 'splitTokens'. Then, sets "token" to be everything to the left of that char. The string object becomes everything to the right of the char. If no more tokenizers remain in the string, then the command returns false and any remaining string is placed into 'token', and the string is left empty. example: CATString test = "Beer:Whiskey!Sex"; CATString token; while (!test.IsEmpty()) { if (!test.PullNextToken(token,":!")) printf("(Last token....)\n"); printf("%s\n",(const char*)token); } Output: Beer Whiskey (Last token....) Sex Definition at line 1587 of file CATString.cpp. References CATASSERT, fAsciiLocked, fStrLen, fUnicodeBuffer, GetWChar(), Left(), LengthCalc(), Right(), and Trim().
|