Skip to main content

decode_utf8_stream

Function decode_utf8_stream 

Source
pub fn decode_utf8_stream(pending: &mut Vec<u8>, bytes: &[u8]) -> String
Expand description

TextDecoder.decode(bytes, {stream: true}): appends bytes to pending and decodes what is complete. A character cut off at the end stays pending; invalid bytes become U+FFFD.