The strtok function

Name

strtok -- 

Synopsis

#include <string.h>

char *strtok (char *s1, const char *s2);

Description

A sequence of calls to the strtok function breaks the string pointed to by s1 into a sequence of tokens, each of which is delimited by a character from the string pointed to by s2. The first call in the sequence has s1 as its first argument, and is followed by calls with a null pointer as their first argument. The separator string pointed to by s2 may be different from call to call.

Returns

The strtok function returns a pointer to the first character of a token, or a null pointer if there is no token.

Implementation Notes

None