utf8proc_encode_char

Function utf8proc_encode_char 

Source
pub unsafe extern "C" fn utf8proc_encode_char(
    codepoint: utf8proc_int32_t,
    dst: *mut utf8proc_uint8_t,
) -> utf8proc_ssize_t
Expand description

Encodes the codepoint as an UTF-8 string in the byte array pointed to by dst. This array must be at least 4 bytes long.

In case of success the number of bytes written is returned, and otherwise 0 is returned.

This function does not check whether codepoint is valid Unicode.