Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/m/mbsrtowcs.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/m/mbsrtowcs.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/m/mbsrtowcs.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/m/mbsrtowcs.html on line 8
Convert a multibyte-character string into a wide-character string (restartable)
#include <wchar.h>
size_t mbsrtowcs( wchar_t * dst,
const char ** src,
size_t n,
mbstate_t * ps );
- dst
- A pointer to a buffer where the function can store the wide-character
string.
- src
- The string of multibyte characters that you want to convert.
- n
- The maximum number of wide characters to store in the buffer that
dst points to.
- ps
- An internal pointer that lets mbsrtowcs() be a restartable
version of
mbstowcs();
if ps is NULL, mbsrtowcs() uses its
own internal variable.
You can call
mbsinit()
to determine the status of this variable.
libc
Use the -l c option to
qcc
to link against this library.
This library is usually included automatically.
The mbsrtowcs() function converts a string of multibyte characters pointed to by src into the corresponding wide characters pointed to by dst, to a maximum of
n wide characters, including the terminating NULL character.
The function converts each character as if by a call to
mbtowc() and stops early if:
- a sequence of bytes doesn't conform to a valid character
Or:
- converting the next character would exceed the limit of n wide characters
This function is affected by LC_TYPE.
- (size_t)-1
- Failure; invalid wide-character code.
- x
- Success; the number of total characters successfully converted,
not including the terminating NULL character.
- EILSEQ
- Invalid character sequence.
- EINVAL
- The ps argument points to an invalid object.
ANSI,
POSIX 1003.1
Safety: | |
Cancellation point |
No |
Interrupt handler |
No |
Signal handler |
Yes |
Thread |
Yes |
errno
mblen(),
mbrlen(),
mbrtowc(),
mbsinit(),
mbstowcs(),
mbtowc()
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/m/mbsrtowcs.html on line 179
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/m/mbsrtowcs.html on line 179