8 uintmax_t wcstoumax(const wchar_t *s, wchar_t **p, int base)
10 const wchar_t *s1 = s;
11 struct intparse ip = {0};
13 if (p) *p = (wchar_t *)s;
15 if (base && base-2U > 34) {
20 for (; iswspace(*s); s++);
23 for (; __intparse(&ip, (char[]){(*s&-(*s<128U))}, 1); s++);
25 if (p && ip.err != EINVAL)
26 *p = (wchar_t *)s1 + ip.cnt;
30 if (ip.err == EINVAL) return 0;
34 return ip.neg ? -ip.val : ip.val;