Rust 字符串按拼音排序
``` extern crate pinyin_order;
fn main() { let mut l = vec!["中文", "中国", "abc", "重工", "abc中文"]; l.sortbykey(|ref s| aspinyin(s)); asserteq!(l, vec!["abc", "abc中文", "中国", "中文", "重工"]); } ```
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.