wcstombs
- convert a wide-character string to a character string
LIBRARY
Lb libc
SYNOPSIS
#include <stdlib.h> size_t
Fo wcstombs
Fa char * restrict mbstring const wchar_t * restrict wcstring
Fa size_t nbytes
Fc
DESCRIPTION
The
wcstombs ();
function converts a wide character string
Fa wcstring
into a multibyte character string,
Fa mbstring ,
beginning in the initial conversion state.
Up to
Fa nbytes
bytes are stored in
Fa mbstring .
Partial multibyte characters at the end of the string are not stored.
The multibyte character string is null terminated if there is room.
RETURN VALUES
The
wcstombs ();
function returns the number of bytes converted
(not including any terminating null), if successful, otherwise it returns
Po Vt size_t Pc Ns -1 .