1 /* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
2 #include <msvcrt/string.h>
4 char* strtok(char *s, const char *delim)
12 if (s == NULL && (s = last) == NULL)
16 * Skip (span) leading delimiters (s += strspn(s, delim), sort of).
20 for (spanp = delim; (sc = *spanp++) != 0;) {
25 if (c == 0) { /* no non-delimiter characters */
32 * Scan token (scan for delimiters: s += strcspn(s, delim), sort of).
33 * Note that delim must have one NUL; we stop if we see that, too.
39 if ((sc = *spanp++) == c) {