Skip to main content

quote

Function quote 

Source
pub fn quote(value: &str) -> String
Expand description

Quote a value so that both this reader and the notation’s own parser read it back unchanged.

One delimiter is enough while the text holds none of that kind; when it holds both kinds, a run of at least three opens the notation’s n-quote form, where the text is literal and only a run at least as long closes it. A value starting with the delimiter would lengthen the opening run, so the other delimiter is used for it.