5个稳定版本

1.1.0 2021年7月1日
1.0.3 2018年7月17日

#48值格式化

Download history · Rust 包仓库 20971/week @ 2024-03-14 · Rust 包仓库 22051/week @ 2024-03-21 · Rust 包仓库 21359/week @ 2024-03-28 · Rust 包仓库 22484/week @ 2024-04-04 · Rust 包仓库 21882/week @ 2024-04-11 · Rust 包仓库 22461/week @ 2024-04-18 · Rust 包仓库 21309/week @ 2024-04-25 · Rust 包仓库 21631/week @ 2024-05-02 · Rust 包仓库 18520/week @ 2024-05-09 · Rust 包仓库 15547/week @ 2024-05-16 · Rust 包仓库 14907/week @ 2024-05-23 · Rust 包仓库 17401/week @ 2024-05-30 · Rust 包仓库 13592/week @ 2024-06-06 · Rust 包仓库 14474/week @ 2024-06-13 · Rust 包仓库 14035/week @ 2024-06-20 · Rust 包仓库 11856/week @ 2024-06-27 · Rust 包仓库

56,917 每月下载量
用于 57 个crates (24直接)

无许可证

7KB
105

enquote crate docs

这个Rust库对字符串进行引号、取消引号和转义。

示例

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

lib.rs:

这个Rust库对字符串进行引号、取消引号和转义。

示例

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

依赖项

~290–750KB
~18K SLoC