Standard C Functions


strtok


Syntax

#include <string.h>
char *strtok(char *string1, const char *string2);

Arguments

string1      pointer to the character string when taking the first token
             Specify NULL when taking out the next token
string2      delimiting string character when taking tokens out

Return Value

 
Pointer to the token removed from string1.  If there are no more tokens in string1, 
the function returns NULL 

Description

Through repeated calls, it breaks up string1 into a sequence of tokens, each of which is delimited by the character specified by string2. Calls subsequent to the first specify a NULL character as the first argument.