update elf.h with powerpc64 elfv2 abi related macros
[musl.git] / src / string / wcscspn.c
blobc4e52722e11d8d5cccb862a95a93dab2564dcc6a
1 #include <wchar.h>
3 size_t wcscspn(const wchar_t *s, const wchar_t *c)
5 const wchar_t *a;
6 if (!c[0]) return wcslen(s);
7 if (!c[1]) return (s=wcschr(a=s, *c)) ? s-a : wcslen(a);
8 for (a=s; *s && !wcschr(c, *s); s++);
9 return s-a;