Viet-Trung Luu | 96b05c1 | 2016-01-11 11:26:36 -0800 | [diff] [blame] | 1 | #include <wchar.h> |
2 | |||||
George Kulakowski | 17e3b04 | 2016-02-18 15:59:50 -0800 | [diff] [blame] | 3 | size_t wcsspn(const wchar_t* s, const wchar_t* c) { |
4 | const wchar_t* a; | ||||
5 | for (a = s; *s && wcschr(c, *s); s++) | ||||
6 | ; | ||||
7 | return s - a; | ||||
Viet-Trung Luu | 96b05c1 | 2016-01-11 11:26:36 -0800 | [diff] [blame] | 8 | } |