Skip to main content

escape_string

Function escape_string 

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

Escape a string for embedding in a JS/TS double-quoted literal. Mirrors: JSON.stringify(str).slice(1, -1)