Add wxNumberFormatter class helping to deal with thousands separators.

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
This commit is contained in:
Vadim Zeitlin
2011-01-19 10:47:40 +00:00
parent 6e91eb1f76
commit 6686fbad16
33 changed files with 822 additions and 4 deletions

View File

@@ -975,8 +975,13 @@ public:
you are sure that this string contains a floating point number formatted with
the rules of the locale currently in use (see wxLocale).
Refer to the docs of the standard function @c strtod() for more details about
the supported syntax.
Also notice that even this function is locale-specific it does not
support strings with thousands separators in them, even if the current
locale uses digits grouping. You may use wxNumberFormatter::FromString()
to parse such strings.
Please refer to the documentation of the standard function @c strtod()
for more details about the supported syntax.
@see ToCDouble(), ToLong(), ToULong()
*/
@@ -1015,8 +1020,12 @@ public:
that this string contains an integer number formatted with
the rules of the locale currently in use (see wxLocale).
Refer to the docs of the standard function @c strtol() for more details about
the supported syntax.
As with ToDouble(), this function does not support strings containing
thousands separators even if the current locale uses digits grouping.
You may use wxNumberFormatter::FromString() to parse such strings.
Please refer to the documentation of the standard function @c strtol()
for more details about the supported syntax.
@see ToCDouble(), ToDouble(), ToULong()
*/