11个版本 (4个稳定版)
1.0.5 | 2024年2月11日 |
---|---|
1.0.2 | 2023年12月16日 |
1.0.1 | 2023年9月17日 |
0.2.2 | 2023年3月29日 |
0.1.2 | 2020年12月30日 |
#22 in 电子邮件
60,191 每月下载量
用于 17 个Crates (5个直接使用)
39KB
739 代码行
rfc2047-decoder

状态
该项目被视为已完成,只会修复错误,所以不要奇怪,如果最后的提交已经有一段时间了。
简介
Rust库,用于解码RFC 2047 MIME消息头。
use rfc2047_decoder;
fn main() {
let encoded_str = "=?UTF-8?Q?str?=";
let decoded_str = "str";
// using the decode helper (default options)
assert_eq!(
rfc2047_decoder::decode(encoded_str.as_bytes()).unwrap(),
decoded_str
);
// using the decoder builder (custom options)
assert_eq!(
rfc2047_decoder::Decoder::new()
.too_long_encoded_word_strategy(rfc2047_decoder::RecoverStrategy::Skip)
.decode(encoded_str.as_bytes())
.unwrap(),
decoded_str
);
}
赞助
依赖项
~6.5MB
~176K SLoC