Find the next token in a string.
LPSTR strtok( LPCSTR lpszStrToken, LPCSTR lpcszDelimit )
Returns a pointer to the first character of the next token.
EX1
void strtok_ex1() { char strToken[] = "This,is a.list\tof:tokens"; char strDelimiter[] = ", .\t:"; char * ptok; ptok = strtok(strToken,strDelimiter); // get first token out_str(ptok); while(ptok=strtok(NULL,strDelimiter)) // get next token out_str(ptok); }
origin.h