mirror of https://git.musl-libc.org/git/musl
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
269 B
12 lines
269 B
#include <wchar.h>
|
|
|
|
wchar_t *wcstok(wchar_t *restrict s, const wchar_t *restrict sep, wchar_t **restrict p)
|
|
{
|
|
if (!s && !(s = *p)) return NULL;
|
|
s += wcsspn(s, sep);
|
|
if (!*s) return *p = 0;
|
|
*p = s + wcscspn(s, sep);
|
|
if (**p) *(*p)++ = 0;
|
|
else *p = 0;
|
|
return s;
|
|
}
|
|
|