Skip to main content

get_lossy_string

Function get_lossy_string 

Source
pub fn get_lossy_string(string_value: Value<'_>) -> Result<String>
Expand description

Convert a JS string to a String, replacing lone UTF-16 surrogates with U+FFFD per WHATWG USVString. Use when ill-formed strings must not fail.