kernel/src/klibc/klibc.c
char * os_strtok(char * s, char * sep) {
    static char * p;
    if (!s && !(s = p)) return NULL;
    s += os_strspn(s, sep);
    if (!*s) return p = 0;
    p = s + os_strcspn(s, sep);
    if (*p)
        *p++ = 0;
    else
        p = 0;
    return s;
}
/* A re-entrant function that returns a substring of s. The substring starts
 at the beginning of the string or the previous index of one of the
 delimiter characters (indicated by sep). The substring ends at the next
 delimeter character (indicated by sep).
 */
A re-entrant function that returns a substring of s. The substring starts
at the beginning of the string or the previous index of one of the
delimiter characters (indicated by sep). The substring ends at the next
delimeter character (indicated by sep).
A re - entrant function that returns a substring of s . The substring starts at the beginning of the string or the previous index of one of the delimiter characters ( indicated by sep ) . The substring ends at the next delimeter character ( indicated by sep ) .
char * os_strtok(char * s, char * sep) {
    static char * p;
    if (!s && !(s = p)) return NULL;
    s += os_strspn(s, sep);
    if (!*s) return p = 0;
    p = s + os_strcspn(s, sep);
    if (*p)
        *p++ = 0;
    else
        p = 0;
    return s;
}
char * os_strtok ( char * s , char * sep ) { static char * p ; if ( ! s && ! ( s = p ) ) return NULL ; s += os_strspn ( s , sep ) ; if ( ! * s ) return p = 0 ; p = s + os_strcspn ( s , sep ) ; if ( * p ) * p ++ = 0 ; else p = 0 ; return s ; }
A re-entrant function that returns a substring of s. The substring starts
at the beginning of the string or the previous index of one of the
delimiter characters (indicated by sep).
A re - entrant function that returns a substring of s . The substring starts at the beginning of the string or the previous index of one of the delimiter characters ( indicated by sep ) .