[][src]Function encoding_rs::mem::copy_ascii_to_basic_latin

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

Copies ASCII from source to destination zero-extending it to UTF-16 up to the first non-ASCII byte (or the end of the input if it is ASCII in its entirety).

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

Returns the number of u16s written.

Panics

Panics if the destination buffer is shorter than stated above.