Convert a wide character into a multibyte character
#include <uchar.h>
size_t c16rtomb( char *s,
char16_t wc,
mbstate_t *pst );
size_t c32rtomb( char *s,
char32_t wc,
mbstate_t *pst );
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The c16rtomb() and c32rtomb() functions determine the number of bytes needed to convert a wide character into a multibyte character, if possible. If s isn't NULL, the functions actually do the conversion.
The number of bytes needed to convert the wide character, or -1 if wc isn't a valid wide character.
| Safety: | |
|---|---|
| Cancellation point | No |
| Interrupt handler | No |
| Signal handler | Yes |
| Thread | Yes |