pub unsafe extern "C" fn utf8proc_map(
str_: *const utf8proc_uint8_t,
strlen: utf8proc_ssize_t,
dstptr: *mut *mut utf8proc_uint8_t,
options: utf8proc_option_t,
) -> utf8proc_ssize_tExpand description
Maps the given UTF-8 string pointed to by str to a new UTF-8
string, allocated dynamically by malloc and returned via dstptr.
If the @ref UTF8PROC_NULLTERM flag in the options field is set,
the length is determined by a NULL terminator, otherwise the
parameter strlen is evaluated to determine the string length, but
in any case the result will be NULL terminated (though it might
contain NULL characters with the string if str contained NULL
characters). Other flags in the options field are passed to the
functions defined above, and regarded as described. See also
utf8proc_map_custom() to supply a custom codepoint transformation.
In case of success the length of the new string is returned, otherwise a negative error code is returned.
@note The memory of the new UTF-8 string will have been allocated
with malloc, and should therefore be deallocated with free.