char string library. There is a character string splitting function.
Diff: CharUtil.cpp
- Revision:
- 2:dbd6f2a04946
- Parent:
- 1:fc299d8c1c7e
--- a/CharUtil.cpp Sun Dec 03 06:19:23 2017 +0000 +++ b/CharUtil.cpp Sun Apr 29 05:01:14 2018 +0000 @@ -7,14 +7,14 @@ } int CharUtil::split(char *base, const char *delim, char *outlist[]){ - char *token; + char *tokenPointer; int cnt = 0; - token = strtok(base, delim); + tokenPointer = strtok(base, delim); - while(token != NULL && cnt < MAXITEM) { - outlist[cnt++] = token; - token = strtok(NULL, delim); + while(tokenPointer != NULL && cnt < MAXITEM) { + outlist[cnt++] = tokenPointer; + tokenPointer = strtok(NULL, delim); } return cnt;