Re: NSString localizedStringWithFormat: and thousand separators
Re: NSString localizedStringWithFormat: and thousand separators
- Subject: Re: NSString localizedStringWithFormat: and thousand separators
- From: Nala Gnirut <email@hidden>
- Date: Mon, 24 Jan 2011 23:51:11 +0100
I'm getting the same results with
NSString *test = [NSString localizedStringWithFormat:@"%'6.2f",
900000.55];
NSLog(@"Test: %@", test);
Output is:
Test: '6.2f
On Fri, Jan 21, 2011 at 5:58 PM, David Duncan <email@hidden>wrote:
> On Jan 21, 2011, at 3:21 AM, Nala Gnirut wrote:
>
> > Hi all,
> > according to Apple's documentation, localizedStringWithFormat supports
> > format specifiers as detailed in IEEE printf
> > specification<
> http://pubs.opengroup.org/onlinepubs/009695399/functions/printf.html>
> > .
> >
> > Unfortunately, a simple test does not seem to work as expected when using
> '
> > to request formatting with thousands' grouping character:
> >
> > NSLog(@"Test: %'6.2f", 900000.55);
> >
> > Does localizedStringWithFormat support this or do I need to rely on
> > NSFormatter?
>
>
> How does your test prove or disprove the functionality you are trying to
> test? You seem to be assuming that NSLog calls -localizedStringWithFormat:,
> you probably want to try calling it yourself and logging the results
> instead.
> --
> David Duncan
>
>
_______________________________________________
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