__mbsnrtowcs_chk

Name

__mbsnrtowcs_chk -- convert a multibyte string to a wide-character string, with buffer overflow checking

Synopsis

#include <wchar.h>

size_t __mbsnrtowcs_chk(wchar_t * dest, const char * * src, size_t nmc, size_t len, mbstate_t * ps, size_t destlen);

Description

The interface __mbsnrtowcs_chk() shall function in the same way as the interface mbsnrtowcs(), except that __mbsnrtowcs_chk() shall check for buffer overflow before computing a result. If an overflow is anticipated, the function shall abort and the program calling it shall exit.

The parameter destlen specifies the size of the object dest. If len exceeds destlen, the function shall abort, and the program calling it shall exit.

The __mbsnrtowcs_chk() function is not in the source standard; it is only in the binary standard.