Crates.io | pretty_toa |
lib.rs | pretty_toa |
version | 1.0.0 |
source | src |
created_at | 2017-11-11 13:36:39.175686 |
updated_at | 2017-11-11 14:39:45.999815 |
description | Fast convert (using itoa/dtoa) numbers to strings with thousands separators |
homepage | |
repository | https://github.com/gabime/pretty_toa |
max_upload_size | |
id | 39023 |
size | 10,671 |
Rust crate for converting numbers (integers and floats) to strings with thousands separators.
It is very fast because it uses itoa/dtoa and stack allocated strings.
extern crate pretty_toa;
use pretty_toa::ThousandsSep;
fn main() {
let num = 123_4567;
println!("{} => {}", num, num.thousands_sep());
let num = 123_4567.1234567;
println!("{} => {}", num, num.thousands_sep());
}