pub fn convert_latin1_to_utf8_partial(
src: &[u8],
dst: &mut [u8],
) -> (usize, usize)
Expand description
Converts bytes whose unsigned value is interpreted as Unicode code point (i.e. U+0000 to U+00FF, inclusive) to UTF-8 with potentially insufficient output space.
Returns the number of bytes read and the number of bytes written.
If the output isn’t large enough, not all input is consumed.
§Safety
If you want to convert into a &mut str
, use
convert_utf16_to_str_partial()
instead of using this function
together with the unsafe
method as_bytes_mut()
on &mut str
.