std::c8rtomb

Header: <cuchar>

Converts a single code point from UTF-8 to a narrow multibyte character representation.

# Declarations

std::size_t c8rtomb( char* s, char8_t c8, std::mbstate_t* ps );

(since C++20)

# Parameters

# Return value

The number of bytes stored in the array object (including any shift sequences). This may be zero when c8 is not the final code unit in the UTF-8 representation of a code point.

# Notes

Calls to c8rtomb with a null pointer argument for s may introduce a data race with other calls to c8rtomb with a null pointer argument for s.

# Example

This section is incompleteReason: no example

# See also