24.5 Null-terminated sequence utilities [c.strings]
24.5.6 Multibyte / wide string and character conversion functions [c.mb.wcs]
int mbsinit(const mbstate_t* ps);
int mblen(const char* s, size_t n);
size_t mbstowcs(wchar_t* pwcs, const char* s, size_t n);
size_t wcstombs(char* s, const wchar_t* pwcs, size_t n);
Effects:
These functions have the semantics specified in the C standard library
. int mbtowc(wchar_t* pwc, const char* s, size_t n);
int wctomb(char* s, wchar_t wchar);
Effects:
These functions have the semantics specified in the C standard library
. Remarks:
Calls to these functions
may introduce a data race (
[res.on.data.races])
with other calls to the same function
. size_t mbrlen(const char* s, size_t n, mbstate_t* ps);
size_t mbrtowc(wchar_t* pwc, const char* s, size_t n, mbstate_t* ps);
size_t wcrtomb(char* s, wchar_t wc, mbstate_t* ps);
size_t mbsrtowcs(wchar_t* dst, const char** src, size_t len, mbstate_t* ps);
size_t wcsrtombs(char* dst, const wchar_t** src, size_t len, mbstate_t* ps);
Effects:
These functions have the semantics specified in the C standard library
. Remarks:
Calling these functions
with an
mbstate_t* argument that is a null pointer value
may introduce a data race (
[res.on.data.races])
with other calls to the same function
with an
mbstate_t* argument that is a null pointer value
. 3