enquote

Crates.ioenquote
lib.rsenquote
version1.1.0
sourcesrc
created_at2018-07-17 03:24:50.148037
updated_at2021-07-01 23:05:33.35046
descriptionQuotes and unquotes strings
homepage
repositoryhttps://github.com/reujab/enquote
max_upload_size
id74613
size9,899
Christopher Knight (reujab)

documentation

README

enquote crate docs

This Rust library quotes, unquotes, and unescapes strings.

Example

extern crate enquote;

fn main() {
    assert_eq!(enquote::enquote('\'', "foo'bar"), "'foo\\'bar'");
    assert_eq!(enquote::unquote("'foo\\'bar\\n'").unwrap(), "foo'bar\n");
    assert_eq!(enquote::unescape("\\n", None).unwrap(), "\n");
}
Commit count: 11

cargo fmt