[][src]Crate human_format

human_format provides facilitates creating a formatted string, converting between numbers that are beyond typical needs for humans into a simpler string that conveys the gist of the meaning of the number.


Add the library to your dependencies listing

human_format = "0.2"

Add the crate reference at your crate root

extern crate human_format;

Print some human readable strings

// "1.00 k"
let tmpStr = human_format::Formatter::new()

// "1.00 M"
let tmpStr2 = human_format::Formatter::new()

// "1.00 B"
let tmpStr3 = human_format::Formatter::new()

If you are so inspired you can even try playing with units and customizing your Scales

For more examples you should review the examples on github: tests/demo.rs



Entry point to the lib. Use this to handle your formatting needs.


Provide a customized scaling scheme for your own modeling.