Section: Linux Programmer's Manual (3)
Return to Main Contents
wctomb - convert a wide character to a multibyte sequence
int wctomb(char *s, wchar_t wc);
is not NULL,
function converts the wide character
to its multibyte representation and stores it at the beginning of
the character array pointed to by
It updates the shift state, which
is stored in a static anonymous variable
known only to the
and returns the length of said multibyte representation,
that is, the number of
bytes written at
The programmer must ensure that there is
room for at least
is NULL, the
resets the shift state, known only to this function,
to the initial state, and
returns nonzero if the encoding has nontrivial shift state,
or zero if the encoding is stateless.
is not NULL, the
returns the number of bytes
that have been written to the byte array at
can not be
represented as a multibyte sequence (according
to the current locale), -1 is returned.
is NULL, the
function returns nonzero if the
encoding has nontrivial shift state, or zero if the encoding is stateless.
For an explanation of the terms used in this section, see
||Thread safety||MT-Unsafe race|
POSIX.1-2001, POSIX.1-2008, C99.
The behavior of
depends on the
category of the
a better interface to the same functionality.
This page is part of release 4.15 of the Linux
A description of the project,
information about reporting bugs,
and the latest version of this page,
can be found at
- RETURN VALUE
- CONFORMING TO
- SEE ALSO
This document was created by
using the manual pages.
Time: 12:31:14 GMT, September 19, 2018