|
|
|
7.24.6.4.1 The mbsrtowcs function Synopsis 1 #include <wchar.h> size_t mbsrtowcs(wchar_t * restrict dst, const char ** restrict src, size_t len, mbstate_t * restrict ps); Description 2 The mbsrtowcs function converts a sequence of multibyte characters that begins in the conversion state described by the object pointed to by ps , from the array indirectly pointed to by src into a sequence of corresponding wide characters. If dst is not a null pointer, the converted characters are stored into the array pointed to by dst . Conversion continues up to and including a terminating null character, which is also stored. dst is not a null pointer) when len wide characters have been stored into the array pointed to by dst . 301) Each conversion takes place as if by a call to the mbrtowc function. 3 If dst is not a null pointer, the pointer object pointed to by src is assigned either a null pointer (if conversion stopped due to reaching a terminating null character) or the address dst is not a null pointer, the resulting state described is the initial conversion state. Returns 4 If the input conversion encounters a sequence of bytes that do not form a valid multibyte mbsrtowcs function stores the value of the macro EILSEQ in errno and returns (size_t)(-1) ; the conversion state is unspecified. Otherwise, it returns the number of multibyte characters successfully 301) Thus, the value of len is ignored if dst is a null pointer. §7.24.6.4.1 Library 391 |