std.format add dash separators to large numbers
bearophile
bearophileHUGS at lycos.com
Wed Aug 17 05:18:03 PDT 2011
Jouko Koski:
> While 1_000_000 may be the right thing in program code, the outside world
> would probably like to have numbers printed out according to their locale
> conventions. This is even more important with floating point or monetary
> values.
>
> So before just adding some formatter to Phobos, I think that such
> formatter's use cases should be considered quite carefully.
You are right, of course. On the other hand I don't think there are locales where the right way to print number is with underscores. But often I do want to print large numbers with underscores every three digits. So maybe your idea doesn't help me much.
Bye,
bearophile
More information about the Digitalmars-d-learn
mailing list