Re: NSString localizedStringWithFormat: and thousand separators
Re: NSString localizedStringWithFormat: and thousand separators
- Subject: Re: NSString localizedStringWithFormat: and thousand separators
- From: Roland King <email@hidden>
- Date: Tue, 25 Jan 2011 07:09:52 +0800
On 25-Jan-2011, at 6:59 AM, Graham Cox wrote:
>
> On 25/01/2011, at 9:51 AM, Nala Gnirut wrote:
>
>> I'm getting the same results with
>>
>> NSString *test = [NSString localizedStringWithFormat:@"%'6.2f",
>> 900000.55];
>> NSLog(@"Test: %@", test);
>>
>> Output is:
>>
>> Test: '6.2f
>
>
> That's because you have placed the format specifier inside quote marks. Remove them and try again.
>
> --Graham
>
Don't think so - the apostrophy is exactly what he's trying to test, that's supposed to be the extended printf format for adding thousands separators.
I've tried it on OSX before and despite it being in the manual page linked to for printf formatting I've never made it work. _______________________________________________
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