Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

wctomb - Convert wide character to multibyte character

&pagelevel(4)&pagelevel

Definition

#include <stdlib.h>

int wctomb(char *s, wchar_t wc);

wctomb converts the wide character wc to the corresponding multibyte character and stores this in string s.

No assignment is made if s is a NULL pointer or if the wide character cannot be represented in one byte.

Return val.

0

if s is a NULL pointer.


-1

if the wide character cannot be converted to a multibyte character.


1

otherwise.

Note

This version of the C runtime system only supports one-byte characters as wide character codes. Multibyte characters and wide character codes always have a length of 1 byte.

See also

mblen, mbtowc, mbstowcs, wcstombs