Skip to main content

format_js_string

Function format_js_string 

Source
pub fn format_js_string(s: &str) -> String
Expand description

Format a string like JS JSON.stringify: escape control chars and quotes but preserve non-ASCII unicode (e.g. U+00A0 nbsp) as literal characters.