![]() |
![]() |
![]() |
Convert a wide-character code to a character
#include <wchar.h> size_t wcrtomb( char * s, wchar_t wc, mbstate_t * ps);
libc
The wcrtomb() function determines the number of bytes needed to represent the wide character wc as a multibyte character and stores the multibyte character in the location pointed to by s, to a maximum of MB_CUR_MAX bytes.
The wcrtomb() function uses ps to make it thread safe; if ps is a NULL pointer, wcrtomb() uses its own internal pointer.
This function is affected by LC_CTYPE.
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |
"String manipulation functions" and "Wide-character functions" in the summary of functions chapter.
![]() |
![]() |
![]() |