8 个版本
0.3.0 | 2022 年 11 月 10 日 |
---|---|
0.2.5 | 2021 年 2 月 18 日 |
0.2.4 | 2021 年 1 月 4 日 |
0.2.3 | 2020 年 6 月 29 日 |
0.1.0 | 2020 年 1 月 7 日 |
#401 in 文本处理
3,119 每月下载量
在 4 crates 中使用
14KB
textwrap-macros

简单的过程宏,用于在编译时使用 textwrap
工具。
用法
将 textwrap-macros
crate 添加到 Cargo.toml
清单
[dependencies]
textwrap-macros = "0.2"
然后使用旧式 #[macro_use]
或将其作为任何其他 crate 成员导入
use textwrap_macros::dedent;
const poem: &str = dedent!(r#"
When we two parted
In silence and tears,
Half broken-hearted
To sever for years,
Pale grew thy cheek and cold,
Colder thy kiss;
Truly that hour foretold
Sorrow to this.
"#);
有关宏用法的小示例,请参阅 docs.rs
。以下函数已转换为宏
有关包装函数的更多行为信息,请参阅原始库的 文档。
变更日志
此项目遵循 语义版本控制 并提供 变更日志,格式为 Keep a Changelog。
依赖项
~2MB
~38K SLoC