函数作用
wctomb将一个宽字符转化为多字节字符
函数返回值
If
wctomb converts the wide character to a multibyte character, it returns the number of bytes (which is never greater than
MB_CUR_MAX) in the wide character. If
wchar is the wide-character null character (L'\0'),
wctomb returns 1. If the conversion is not possible in the current locale,
wctomb returns –1.
函数参数说明
mbchar
The address of a multibyte character
wchar
A wide character
Remarks
The
wctomb function converts its
wchar argument to the corresponding multibyte character and stores the result at
mbchar. You can call the function from any point in any program.
