MBTOWC(3C) | Standard C Library Functions | MBTOWC(3C) |
#include <stdlib.h> int mbtowc(wchar_t *restrict pwc, const char *restrict s, size_t n);
#include <stdlib.h> #include <xlocale.h> int mbtowc_l(wchar_t *restrict pwc, const char *restrict s, size_t n, locale_t loc);
A call with s as a null pointer causes this function to return 0. The behavior of this function is affected by the LC_CTYPE category of the current locale. At most n bytes of the array pointed to by s will be examined.
The function mbtowc_l() behaves identically to mbtowc(), except instead of using the current locale, it uses the locale as specified by loc.
In no case will the value returned be greater than n or the value of the MB_CUR_MAX macro.
EILSEQ
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
CSI | Enabled |
Interface Stability | See below. |
MT-Level | MT-Safe |
The mbtowc() function is Standard. The mbtowc_l() function is Uncommitted.
June 23, 2014 | OmniOS |