Formatted Numeric Data
Moderators: CEGUI MVP, CEGUI Team
Formatted Numeric Data
I've Wikied a class to format numeric data according to the rules of various locales (language, country, currency). There is also limited support for custom formatting numeric values in special formats such as telephone numbers, credit card number, etc. Hopefully it can be useful to others.
Updated to v0.5.0.
Fixed a memory leak within formatNumber() and another within _convertLocalAndGmt(). The ICU Library falsely reports memory leaks via the approach. To palliate this I've added a constructor and destructor to call the u_cleanup() function, which deallocates the memory used by the library. My concern is that should the library be used outside of this class then calling this function might cause other problems. In this case the constructor should be used with a false ICU icu(false) to prevent the destructor from deallocating the ICU Library's memory.
Fixed a memory leak within formatNumber() and another within _convertLocalAndGmt(). The ICU Library falsely reports memory leaks via the
Code: Select all
#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>
...
_CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
Return to “Offtopic Discussion”
Who is online
Users browsing this forum: No registered users and 12 guests