Expand description
Deprecated: The pinyin crate has been rewritten, use it instead.
Example:
extern crate pinyin_order;
use pinyin_order::as_pinyin;
fn main() {
let mut l = vec!["中文", "中国", "abc", "重工", "abc中文"];
l.sort_by_key(|s| as_pinyin(s));
assert_eq!(l, vec!["abc", "abc中文", "中国", "中文", "重工"]);
}Enums§
Functions§
- as_
pinyin - 将字符串转换为拼音用于排序