std::c8rtomb
Min standard notice:
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
s: pointer to narrow character array where the multibyte character will be storedc8: the UTF-8 code unit to convertps: pointer to the conversion state object used when interpreting the multibyte string
# 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