According to the documentation, the strtok_r () function is a reentrant version of strtok ().
char *strtok_r(char *s1, const char *s2, char **s3);
It gets the next token from line s1, where tokens are lines separated by characters from s2. To get the first token from s1, strtok_r () is called with s1 as the first parameter. The remaining tokens from s1 are obtained by calling strtok_r () with a null pointer for the first parameter. The separator string s2 may differ from call to call.
Miguel prz
source share