Wiki Markup |
---|
The C99 \[[ISO/IEC 9899-1999|AA. C References#ISO/IEC 9899-1999]\] function {{strtok()}} is a string tokenization function that takes three arguments: an initial string to be parsed, a const-qualified character delimiter, and a pointer to a pointer to modify to return the result. |
The first time strtok() is called, the string is parsed into tokens, character delimiter, and address of the variable in which to return the result are passed as arguments. The strtok() function parses the string up to the first instance of the delimiter character, replaces the character in place with a null byte ('\0'), and puts the address of the first character in the token to the passed-in variable. Subsequent calls to strtok() begin parsing immediately after the most recently-placed null character.
...