#hex-string #buffer #binary #nice #shortened

pretty-hash

将二进制缓冲区输出为简洁的短十六进制字符串

6个版本

使用旧的Rust 2015

0.4.1 2020年1月14日
0.4.0 2018年10月18日
0.2.0 2018年5月9日
0.1.2 2018年4月4日

#975算法

Download history 15/week @ 2023-11-19 11/week @ 2023-11-26 264/week @ 2023-12-03 91/week @ 2023-12-10 5/week @ 2023-12-17 3/week @ 2023-12-24 6/week @ 2023-12-31 250/week @ 2024-01-07 112/week @ 2024-01-14 6/week @ 2024-01-21 10/week @ 2024-01-28 74/week @ 2024-02-11 42/week @ 2024-02-18 63/week @ 2024-02-25 25/week @ 2024-03-03

每月204次下载
用于 4 个crate(2个直接使用)

MIT/Apache

12KB

pretty-hash

crates.io version build status downloads docs.rs docs

将二进制缓冲区输出为简洁的短十六进制字符串。改编自 pfrazee/pretty-hash

用法

extern crate pretty_hash;

let hash = pretty_hash::fmt(b"1234").unwrap();
assert_eq!(hash, "31323334");

let hash = pretty_hash::fmt(b"12345").unwrap();
assert_eq!(hash, "313233..35");

安装

$ cargo add pretty-hash

许可证

MIT OR Apache-2.0

依赖项

~64KB