|MBSTOWCS(3C)||Standard C Library Functions||MBSTOWCS(3C)|
mbstowcs(wchar_t *restrict pwcs,
const char *restrict s, size_t
pwcs, const char *restrict s,
size_t n, locale_t loc);
mbstowcs() function converts a multibyte character string s beginning in the initial conversion state into a wide-character string. If pwcs is not
NULL, the converted characters are stored into array pointed to by pwcs.
Conversion continues up to and including a terminating null character, which is also stored, or until n wide-characters have been stored into the array pointed to by pwcs.
The behavior of
mbstowcs() function is
affected by the
LC_CTYPE category of the current
mbstowcs_l() function behaves
mbstowcs(), except instead of using
the current locale, it uses the locale as specified by
mbstowcs_l() functions return the number of wide-characters successfully converted, not including the terminating null (if any), or
-1if conversion encounters a sequence of bytes that does not form a valid character.
mbstowcs_l() functions will fail if:
mbstowcs() function is Standard. The
mbstowcs_l() function is Uncommitted.
|March 28, 2017||OmniOS|