Crates.io | transliterate1234 |
lib.rs | transliterate1234 |
version | 0.1.1 |
source | src |
created_at | 2022-05-14 07:49:03.117784 |
updated_at | 2022-05-14 07:53:59.558412 |
description | UTF-8 to ASCII transliteration |
homepage | |
repository | https://github.com/thooton/transliterate1234/ |
max_upload_size | |
id | 586561 |
size | 334,883 |
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!");