transliterate1234

Crates.iotransliterate1234
lib.rstransliterate1234
version0.1.1
sourcesrc
created_at2022-05-14 07:49:03.117784
updated_at2022-05-14 07:53:59.558412
descriptionUTF-8 to ASCII transliteration
homepage
repositoryhttps://github.com/thooton/transliterate1234/
max_upload_size
id586561
size334,883
(thooton)

documentation

README

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!");
Commit count: 3

cargo fmt