From e0614f7cd418afedd06c9bcd5abb965608bc52f8 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Thu, 1 Mar 2012 23:24:45 -0500 Subject: add all missing wchar functions except floating point parsers these are mostly untested and adapted directly from corresponding byte string functions and similar. --- src/string/wcstok.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/string/wcstok.c (limited to 'src/string/wcstok.c') diff --git a/src/string/wcstok.c b/src/string/wcstok.c new file mode 100644 index 00000000..c932d0a0 --- /dev/null +++ b/src/string/wcstok.c @@ -0,0 +1,12 @@ +#include + +wchar_t *wcstok(wchar_t *s, const wchar_t *sep, wchar_t **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; +} -- cgit v1.2.1