![]()  | 
![]()  | 
![]()  | 
![]()  | 
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 );
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:
Or:
This function is affected by LC_TYPE.
| Safety: | |
|---|---|
| Cancellation point | No | 
| Interrupt handler | No | 
| Signal handler | Yes | 
| Thread | Yes | 
errno mblen(), mbrlen(), mbrtowc(), mbsinit(), mbstowcs(), mbtowc()
![]()  | 
![]()  | 
![]()  | 
![]()  |