Defined in header <wchar.h>
Converts a sequence of wide characters from the array whose first element is pointed to by
*src to its narrow multibyte representation that begins in the conversion state described by
dst is not null, converted characters are stored in the successive elements of the char array pointed to by
dst. No more than
len bytes are written to the destination array.
Each character is converted as if by a call to wcrtomb. The conversion stops if:
- The null character was converted and stored.
srcis set to NULL and
*psrepresents the initial shift state.
- A wchar_t was found that does not correspond to a valid character in the current C locale.
srcis set to point at the first unconverted wide character.
- the next multibyte character to be stored would exceed
srcis set to point at the first unconverted wide character. This condition is not checked if dst==NULL.
|dst||-||pointer to narrow character array where the multibyte characters will be stored|
|src||-||pointer to pointer to the first element of a null-terminated wide string|
|len||-||number of bytes available in the array pointed to by dst|
|ps||-||pointer to the conversion state object|
On success, returns the number of bytes (including any shift sequences, but excluding the terminating '\0') written to the character array whose first element is pointed to by
dst. If dst==NULL, returns the number of bytes that would have been written.
|This section is incomplete|
Reason: no example
| converts a wide character to its multibyte representation, given state |
| converts a narrow multibyte character string to wide string, given state |
C++ documentation for wcsrtombs