pioneerspacesim/pioneer — pull request #2810 by impaktor (2014-03-13 07:59:21+00:00)
Title:  more powerful format_money

Hopefully the final go for a better money format.

- correct handling of negative numbers: "-$100"
- language specific decimal separator, thousand separator, and grouping of digits.
- suppress showing of cents (default is to show cents, just as now)

This PR has been discussed in [A much smarter money format?](http://pioneerspacesim.net/forum/viewtopic.php?f=3&t=181), and the first version of this PR is in https://github.com/pioneerspacesim/pioneer/pull/2774

@lwho `showCents` now works as (I think) you suggested, by rounding off.

`std::round` is in C++11, I don't know if this is a problem for Visual Studio users (@fluffyfreak)?

I was a bit shaky on the use of `Lang::`, but those three lines (in utils.cpp) work fine, so I assume they're good.