Formatted Numeric Data

Forum for general chit-chat or off-topic discussion.

Moderators: CEGUI MVP, CEGUI Team

Rackle
CEGUI Team (Retired)
Posts: 534
Joined: Mon Jan 16, 2006 11:59
Location: Montréal

Formatted Numeric Data

Postby Rackle » Thu May 18, 2006 23:15

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.

Rackle
CEGUI Team (Retired)
Posts: 534
Joined: Mon Jan 16, 2006 11:59
Location: Montréal

Postby Rackle » Fri Jun 23, 2006 15:25

Updated to v0.5.0.

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 );
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.

Rackle
CEGUI Team (Retired)
Posts: 534
Joined: Mon Jan 16, 2006 11:59
Location: Montréal

Postby Rackle » Fri Dec 01, 2006 17:47

Made compatible with CEGUI v0.5 release

User avatar
scriptkid
Home away from home
Home away from home
Posts: 1178
Joined: Wed Jan 12, 2005 12:06
Location: The Hague, The Netherlands
Contact:

Postby scriptkid » Fri Dec 01, 2006 21:51

Hi,

i read about this page for the first time. Nice work! :-)


Return to “Offtopic Discussion”

Who is online

Users browsing this forum: No registered users and 4 guests