| Crates.io | num-to-english |
| lib.rs | num-to-english |
| version | 0.1.0 |
| created_at | 2025-11-09 16:34:45.529832+00 |
| updated_at | 2025-11-09 16:34:45.529832+00 |
| description | Convert integers to their English word representation. |
| homepage | https://github.com/christoffetzer/num-to-english |
| repository | https://github.com/christoffetzer/num-to-english |
| max_upload_size | |
| id | 1924268 |
| size | 5,311 |
num-to-englishConvert integers 0..127 into their English word representation. Suitable for formatting numbers in logs, UI output, reports, accessibility features, and educational tools.
use num_to_english::english;
fn main() {
assert_eq!(english(42), (42, "fortytwo".to_string()));
assert_eq!(english(127), (127, "one hundred twentyseven".to_string()));
assert_eq!(english(7), (7, "seven".to_string()));
}
Add to your Cargo.toml:
[dependencies]
num-to-english = "0.1"
use num_to_english::english;
println!(r#"(84, "eightyfour") = {:?}"#, english(84));
println!(r"fortytwo = {}", english(42).1);