Files
ntext-rs/README.md
T
Uttarayan Mondal cc82c47628 Update 2.0
Changes to formatting system

Create a formatting struct and then pass it to the
to_text macro or the
to_text_fmt function to format the strings accordingly
Updated docs for the new version
2021-03-08 23:40:19 +05:30

32 lines
620 B
Markdown

# ntext-rs
Documentation of [ntext-rs](https://uttarayan21.github.io/ntext-rs) generated by cargo doc.
A rust library to get numbers (usize) as words
`12345 ` -> `twelvethousandthreehundredfortyfive`
Add to cargo.toml
```toml
[dependencies]
ntext = { git = "https://github.com/uttarayan21/ntext" }
```
Example program
```rust
extern crate ntext;
use ntext::to_text;
fn main() {
println!("{}",to_text!(12345));
println!("{}",to_text!(12345," "));
}
```
which should output
`twelvethousandthreehundredfortyfive`
`twelve thousand three hundred forty five`
I will probably add formatting the text later