Skip to main content

to_string_lossy

Function to_string_lossy 

Source
pub fn to_string_lossy(units: &[u16]) -> String
Expand description

Decode UTF-16 code units back to a Rust String, mapping any unpaired surrogate to U+FFFD — the same replacement node performs when a lone surrogate is written to stdout.