3 #include "tsrm_config_common.h"
4 #include "tsrm_strtok_r.h"
6 static inline int in_character_class(char ch
, const char *delim
)
17 char *tsrm_strtok_r(char *s
, const char *delim
, char **last
)
25 while (*s
&& in_character_class(*s
, delim
)) {
34 while (*s
&& !in_character_class(*s
, delim
)) {
50 char foo
[] = "/foo/bar//\\barbara";
54 token
= tsrm_strtok_r(foo
, "/\\", &last
);
56 printf ("Token = '%s'\n", token
);
57 token
= tsrm_strtok_r(NULL
, "/\\", &last
);