• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSString localizedStringWithFormat: and thousand separators
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: NSString localizedStringWithFormat: and thousand separators
      • From: Graham Cox <email@hidden>
References: 
 >NSString localizedStringWithFormat: and thousand separators (From: Nala Gnirut <email@hidden>)
 >Re: NSString localizedStringWithFormat: and thousand separators (From: David Duncan <email@hidden>)
 >Re: NSString localizedStringWithFormat: and thousand separators (From: Nala Gnirut <email@hidden>)
 >Re: NSString localizedStringWithFormat: and thousand separators (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: NSString localizedStringWithFormat: and thousand separators
  • Next by Date: Re: NSString localizedStringWithFormat: and thousand separators
  • Previous by thread: Re: NSString localizedStringWithFormat: and thousand separators
  • Next by thread: Re: NSString localizedStringWithFormat: and thousand separators
  • Index(es):
    • Date
    • Thread