The C wchar_t
is interpreted character by character and translated to its multibyte equivalent, which is stored in the location pointed by mbstr
. The length in bytes of the resulting multibyte string, not including the ending null-character, is returned.
- Pointer to an array of char elements at least max bytes long.
- C wchar_t string to be translated.
- Maximum number of bytes to be written to mbstr.
The number of bytes (not characters) translated and written to mbstr
, not including the ending null-character.
If an invalid multibyte character is encountered, a -1
value is returned.
|mblen|| Get length of multibyte character (function)|
|wctomb|| Convert wide character to multibyte character (function)|
|mbstowcs|| Convert multibyte string to wide-character string (function)|