encode_to_slice

Function encode_to_slice 

Source
pub fn encode_to_slice<T: Textcode>(
    src: impl AsRef<str>,
    dst: &mut [u8],
) -> usize
Expand description

Encodes UTF-8 string to the target encoding slice. Returns the number of bytes written.