pub unsafe fn convert_valid_utf32_to_utf8(
src: *const u32,
len: usize,
dst: *mut u8,
) -> usizeExpand description
Convert valid UTF-32 string into UTF-8 string.
Returns the number of written code units.
This function uses native endianness.
ยงSafety
- The input string must be valid UTF-32.
srcanddstmust be non-null and properly aligned.srcmust be valid for reads oflen * size_of::<u32>()bytesdstmust be valid for writes ofcount * size_of::<u8>()bytes, where thecountis the number of code units (u8) after successful conversion.- The memory regions of
srcanddstmust not overlap.