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.
Multithreading (see pthreads(7))
function is not thread-safe.
The behavior of
depends on the
category of the
a better interface to the same functionality.
This page is part of release 3.54 of the Linux
A description of the project,
and information about reporting bugs,
can be found at
- RETURN VALUE
- Multithreading (see pthreads(7))
- CONFORMING TO
- SEE ALSO
This document was created by
using the manual pages.
Time: 20:22:37 GMT, January 17, 2018