10个版本
| 0.4.0 | 2023年8月22日 |
|---|---|
| 0.3.0 | 2020年9月15日 |
| 0.2.5 | 2020年9月9日 |
| 0.2.3 | 2020年8月16日 |
| 0.1.2 | 2020年6月12日 |
#73 in 值格式化
5,945 每月下载量
用于 10 个crate(7个直接使用)
15KB
234 行
dyn-fmt
提供动态字符串格式化。
use dyn_fmt::AsStrFormatExt;
fn main() {
assert_eq!("{}a{}b{}c".format(&[1, 2, 3]), "1a2b3c");
assert_eq!("{}a{}b{}c".format(&[1, 2, 3, 4]), "1a2b3c");
assert_eq!("{}a{}b{}c".format(&[1, 2]), "1a2bc");
assert_eq!("{{}}{}".format(&[1, 2]), "{}1");
}
比较
| dyn-fmt | strfmt | dynfmt | |
|---|---|---|---|
| 无 std | + | - | - |
| 易于使用但功能强大的API,您会喜欢使用 | + | +/- | - |
| 优秀的许可证 | + | +/- | +/- |