#include <stdlib.h>
|
|
size_t
wcstombs (char * restrict dst, const wchar_t * restrict src, size_t nbytes);
|
The behavior of the wcstombs is affected by LC_CTYPE category of the current locale.
#include <stdlib.h>
#include <wchar.h>
/* Illustrates how to use wcstombs API */
size_t example_wcstombs(wchar_t *wcs, char *s, size_t n)
{
size_t len;
/* converting multibyte string to a wide-char string */
len = wcstombs(s, (const wchar_t *)wcs, n);
/* returning no of bytes that make up the multibyte sequence */
return (len;);
}
| [EILSEQ] | |
| An invalid wide character was encountered. | |
| [EINVAL] | |
| The conversion state is invalid. | |
|
© 2005-2007 Nokia |