strtok
Subroutine
string strtok(const char *s, const char *delim)
strtok
parses a string into a sequence of tokens by using delim as the delimiting string . When you first call strtok
, specify the string to be parsed in s
. In each subsequent call to obtain the next token, specify str
as NULL. You can specify a different delimiter for each call. The internal pointer that strtok
uses to traverse s is only valid within multiple calls to the same probe. That is, it behaves like an implicit clause-local variable. strtok
returns NULL if there are no more tokens.