mbstowcs [ HP C/iX Library Reference Manual ] MPE/iX 5.0 Documentation
HP C/iX Library Reference Manual
mbstowcs
Converts a sequence of multibyte characters in a null-terminated string
to a sequence of wide character codes.
Syntax
#include <stdlib.h>
size_t mbstowcs(wchar_t *pwcs, const char *s, size_t n);
Parameters
pwcs A pointer to an array of wide characters where the
converted wide character codes are stored.
s A pointer to a sequence of multibyte characters to be
converted.
n An expression indicating the maximum number of codes to be
stored into the array pointed to by pwcs.
Return Values
x The number of array elements modified, not including
a terminating zero. If x = n, the array is not
zero-terminated.
size_t(-1) Invalid multibyte character found.
Description
The multibyte characters from the array pointed to by s are converted to
wide character codes and stored into the array pointed to by pwcs. No
more than n elements will be modified in the array pointed to by pwcs.
See Also
wchar_t, MB_CUR_MAX, mbtowc(), wctomb(), mbstowcs(), wcstombs(), ANSI C
4.10.8.1
MPE/iX 5.0 Documentation