Skip to content
/ enquote Public

A Rust library that quotes, unquotes, and unescapes strings

License

Notifications You must be signed in to change notification settings

reujab/enquote

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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");
}

About

A Rust library that quotes, unquotes, and unescapes strings

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages