Crates.io | enquote |
lib.rs | enquote |
version | 1.1.0 |
source | src |
created_at | 2018-07-17 03:24:50.148037 |
updated_at | 2021-07-01 23:05:33.35046 |
description | Quotes and unquotes strings |
homepage | |
repository | https://github.com/reujab/enquote |
max_upload_size | |
id | 74613 |
size | 9,899 |
This Rust library quotes, unquotes, and unescapes strings.
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");
}