utf8proc_decompose

Function utf8proc_decompose 

Source
pub unsafe extern "C" fn utf8proc_decompose(
    str_: *const utf8proc_uint8_t,
    strlen: utf8proc_ssize_t,
    buffer: *mut utf8proc_int32_t,
    bufsize: utf8proc_ssize_t,
    options: utf8proc_option_t,
) -> utf8proc_ssize_t
Expand description

The same as utf8proc_decompose_char(), but acts on a whole UTF-8 string and orders the decomposed sequences correctly.

If the @ref UTF8PROC_NULLTERM flag in options is set, processing will be stopped, when a NULL byte is encountered, otherwise strlen bytes are processed. The result (in the form of 32-bit unicode codepoints) is written into the buffer being pointed to by buffer (which must contain at least bufsize entries). In case of success, the number of codepoints written is returned; in case of an error, a negative error code is returned (utf8proc_errmsg()). See utf8proc_decompose_custom() to supply additional transformations.

If the number of written codepoints would be bigger than bufsize, the required buffer size is returned, while the buffer will be overwritten with undefined data.