Main index | Section 3 | Options |
#include <wchar.h>
If dst is NULL, no characters are stored.
If dst is not NULL, the pointer pointed to by src is updated to point to the character after the one that conversion stopped at. If conversion stops because a null character is encountered, *src is set to NULL.
The mbstate_t argument, ps, is used to keep track of the shift state. If it is NULL, mbsrtowcs() uses an internal, static mbstate_t object, which is initialized to the initial conversion state at program startup.
The mbsnrtowcs() function behaves identically to mbsrtowcs(), except that conversion stops after reading at most nms bytes from the buffer pointed to by src.
If dst was NULL then the functions mbsrtowcs() and mbsnrtowcs() return the number of wide characters that would have been stored where dst points to an infinitely large array.
If either one of the functions is not successful then (size_t )-1 is returned.
[EILSEQ] | |
An invalid multibyte character sequence was encountered. | |
[EINVAL] | |
The conversion state is invalid. | |
The mbsnrtowcs() function is an extension to the standard.
MBSRTOWCS (3) | August 7, 2020 |
Main index | Section 3 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
“ | Ken Thompson was once asked by a reporter what he would have changed about Unix if he had it all to do over again. His answer: “I would spell creat with an ‘e.'” | ” |