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