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/w/wcsrtombs.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/w/wcsrtombs.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/w/wcsrtombs.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/w/wcsrtombs.html on line 8
Convert a wide-character string into a multibyte character string (restartable)
#include <wchar.h>
size_t wcsrtombs( char * dst,
const wchar_t ** src,
size_t len,
mbstate_t * ps);
- dst
- A pointer to a buffer where the function can store the
multibyte-character string.
- src
- A pointer to the wide-character string that you want to convert.
- len
- The maximum number of multibyte characters to store.
- ps
- An internal pointer that lets wcsrtombs() be a restartable
version of
wcstombs();
if ps is NULL, wcsrtombs() 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 wcsrtombs() function converts a string of wide-characters pointed to by src into the corresponding multi-byte characters pointed to by dst. No more than len bytes are stored, including the terminating NULL character.
The function converts each character as if by a call to
wctomb() and stops early if:
- A sequence of bytes doesn't conform to a valid character.
- Converting the next character would exceed the limit of len total bytes.
The wcsrtombs() function uses ps to make it thread safe; if ps is a NULL pointer, wcsrtombs() uses its own internal pointer.
The number of total bytes successfully converted, not including the
terminating NULL byte, or (size_t)-1 if an
invalid wide-character code was found.
ANSI,
POSIX 1003.1
Safety: | |
Cancellation point |
No |
Interrupt handler |
No |
Signal handler |
Yes |
Thread |
Yes |
wcrtomb(),
wcstod(), wcstof(), wcstold(),
wcstoimax(), wcstoumax(),
wcstok(),
wcstol(), wcstoll(),
wcstombs(),
wcstoul(), wcstoull(),
wctob(),
wctomb()
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/w/wcsrtombs.html on line 150
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/w/wcsrtombs.html on line 150