12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- #include <wchar.h>
- size_t
- wcsspn(const wchar_t *s, const wchar_t *set)
- {
- const wchar_t *p;
- const wchar_t *q;
- p = s;
- while (*p) {
- q = set;
- while (*q) {
- if (*p == *q)
- break;
- q++;
- }
- if (!*q)
- goto done;
- p++;
- }
- done:
- return (p - s);
- }
|