8 releases (1 stable)
1.0.0 | Jan 23, 2020 |
---|---|
0.1.6 | Jan 3, 2020 |
0.1.5 | Dec 30, 2019 |
#315 in Internationalization (i18n)
25 downloads per month
20KB
384 lines
say-number
Library to say numbers in English, Chinese (simplified), French, Japanese and Vietnamese.
Quickstart
Add the following to your Cargo.toml
file.
[dependencies]
say-number = "0.1"
Examples
println!("The number is {}.", say_number::say(42));
assert_eq!(say_number::say(514), "five hundred and fourteen".to_string());
assert_eq!(say_number::english::say(514), "five hundred and fourteen".to_string());
assert_eq!(say_number::chinese_simplified::say(514), "五百一十四".to_string());
assert_eq!(say_number::french::say(514), "cinq-cent-quatorze".to_string());
assert_eq!(say_number::japanese::say(514), "五百十四".to_string());
assert_eq!(say_number::vietnamese::say(514), "năm trăm mười bốn".to_string());
Dependencies
~460KB