2 releases
0.1.1 | May 14, 2022 |
---|---|
0.1.0 | May 14, 2022 |
#1969 in Text processing
335KB
transliterate1234
Converts UTF-8 &str
to ASCII String
. I stole the data file from the popular npm module transliteration and wrote 15 lines.
use transliterate1234::transliterate;
assert_eq!(transliterate("你好,世界"), "NiHao,ShiJie");
assert_eq!(transliterate("Γεια σας, τον κόσμο"), "Geia sas, ton kosmo");
assert_eq!(transliterate("안녕하세요, 세계"), "annyeonghaseyo, segye");
assert_eq!(transliterate("你好, world!"), "NiHao, world!");