pub fn copy_basic_latin_to_ascii(src: &[u16], dst: &mut [u8]) -> usize
Expand description

Copies Basic Latin from source to destination narrowing it to ASCII up to the first non-Basic Latin code unit (or the end of the input if it is Basic Latin in its entirety).

The length of the destination buffer must be at least the length of the source buffer.

Returns the number of bytes written.

Panics

Panics if the destination buffer is shorter than stated above.