utf8proc_map

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 @ref utfproc_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.

version(DerelictUTF8Proc_Static)extern
utf8proc_ssize_t
utf8proc_map
(
const utf8proc_uint8_t* str
,
utf8proc_ssize_t strlen
,
utf8proc_uint8_t** dstptr
,
)

Meta