std.format add dash separators to large numbers

bearophile bearophileHUGS at lycos.com
Tue Aug 16 20:11:20 PDT 2011


Andrej Mitrovic:

> Can format do something like this yet?
> 
> auto str = format("%s", 1000000);
> assert(str == "1_000_000");
> 
> %s would have to be replaced with something else, obviously.

I suggest to add such formatter/function to Phobos.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list