Syntax | #include <string.h> char * strtok(char *s1, const char *s2); |
Description |
The start and end criterion for each token are separator characters (delimiters), which must be specified in a second string s2. Tokens may be delimited by one or more such separators or by the beginning and end of the entire string s1. Blanks, colons, commas, etc., are typical separators between the words of a sentence.
A different delimiter string s2 may be specified in each call.
|
Return val. | Pointer to the start of a token. A pointer to the first token is returned at the first call; a pointer to the next token at the next call, and so on. Null pointer, if no token, or no further token was found. |
See also |
|