1 #include <wchar.h> 2 mbrlen(const char * restrict s,size_t n,mbstate_t * restrict st)3 size_t mbrlen(const char *restrict s, size_t n, mbstate_t *restrict st) 4 { 5 static unsigned internal; 6 return mbrtowc(0, s, n, st ? st : (mbstate_t *)&internal); 7 } 8