The existing ToString() is not flexible enough to be used in wxGrid,
which supports specifying the width (and not just the precision) as well
as using formats other than "%g" and "%f" which are the only ones
supported by the existing function.
Note that currently the implementation simply calls wxString::Format()
and then adjusts the decimal separator, but it could, in principle, use
wxUILocale methods for formatting the floating point numbers using
native platform functions for doing this, e.g. CFNumberFormatter under
macOS.
Always use the UI locale conventions for floating point numbers in
wxNumberFormatter, making it different from wxString::{To,From}Double()
functions that use C locale, which may, or not, correspond to the UI
locale.
This is necessary in order to deal with the numbers greater than
wxINT64_MAX that can't be represented in just long long.
It also allows to implement the intuitive handling of minus sign for the
unsigned numbers, i.e. not to accept it in FromString(), unlike the
standard functions which do (and parse -1 as 0xffff...fff).
Also extend the tests to check for more boundary cases.
wxNumberFormatter formats and parses numbers with thousands separators.
Add the class itself as well as documentation and the unit test for it.
See #12166.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66710 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775