c8rtomb

Header: <uchar.h>

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

# Declarations

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

(since C23)

# 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