size_t mbrlen(const char *s, size_t n, mbstate_t *ps);
mbrlen function is equivalent to the call:
mbrtowc(NULL, s, n, ps != NULL ? ps : &internal);
where internal is the mbstate_t object for the mbrlen function, except that the expression designated by ps is evaluated only once.