Chapter 13: The Wide-Character Functions

wctomb

#include <stdlib.h>int wctomb(char *out,  wchar_t in);

The wctomb( ) function converts the wide character in in into its multibyte equivalent and puts the result in the object pointed to by out. The array pointed to by out must be at least MB_CUR_MAX characters long.

If successful, wctomb( ) returns the number of bytes contained in the multibyte character. On failure, -1 is returned.

If out is null, then wctomb( ) returns nonzero if the multibyte character has state-dependent encodings, and zero if it does not.

Related functions are wcstombs( ) and mbtowc( ).




C(s)C++ Programmer's Reference
C Programming on the IBM PC (C Programmers Reference Guide Series)
ISBN: 0673462897
EAN: 2147483647
Year: 2002
Pages: 539

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net