Skip to main content

encode_to_slice

Function encode_to_slice 

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

Encodes a UTF-8 string to a DVB text slice with the charset header.

Returns the number of bytes written including the header.