Function ucs2::decode

source ·
pub fn decode(input: &[u16], output: &mut [u8]) -> Result<usize, Error>
Expand description

Decode an input UCS-2 string into a UTF-8 string.

The returned usize represents the length of the returned buffer, in bytes. Due to the nature of UCS-2, the output buffer could end up with three bytes for every character in the input buffer.