pretty_toa

Crates.iopretty_toa
lib.rspretty_toa
version1.0.0
sourcesrc
created_at2017-11-11 13:36:39.175686
updated_at2017-11-11 14:39:45.999815
descriptionFast convert (using itoa/dtoa) numbers to strings with thousands separators
homepage
repositoryhttps://github.com/gabime/pretty_toa
max_upload_size
id39023
size10,671
Gabi Melman (gabime)

documentation

README

pretty_toa

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.

Usage Example

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());
}
Commit count: 11

cargo fmt