Function preserves_schema::syntax::block::escape_string
source · pub fn escape_string(s: &str) -> String
Expand description
Escapes s
by substituting \\
for \
, \"
for "
, and \u{...}
for characters
outside the range 32..126, inclusive.
This process is intended to generate literals compatible with rustc
; see the language
reference on “Character and string
literals”.