/pretty_toa

Rust crate for fast convert numbers to strings with thousands separators.

Primary LanguageRustMIT LicenseMIT

pretty_toa

Rust crate for converting numbers (integers and floats) to strings with thousands separators.

It is very fast because it uses itoa/dtoa crates with 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());
}