Re: Formatting float numbers
Re: Formatting float numbers
- Subject: Re: Formatting float numbers
- From: Greg Parker <email@hidden>
- Date: Wed, 25 Aug 2010 13:13:57 -0700
On Aug 23, 2010, at 1:35 AM, Adriano Brandão wrote:
> Thanks man, I tested here and it's working now.
>
> But, just for curiosity, if I was using only c++ wouldn't I be able to do that?
libicu's C interface provides the same number formatting as NSNumberFormatter. They're both implementing the Unicode Locale Data Markup Language: http://unicode.org/reports/tr35/tr35-6.html#Number_Format_Patterns .
Otherwise you'd have to write some extra code. For example, use %.#2f to write to a string, then delete any trailing `.`.
--
Greg Parker email@hidden Runtime Wrangler
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden