• 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: NSScanner troubles
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSScanner troubles


  • Subject: Re: NSScanner troubles
  • From: WT <email@hidden>
  • Date: Sat, 11 Dec 2010 10:36:56 -0200

On Dec 11, 2010, at 6:03 AM, Ron Fleckner wrote:

> Hi,
>
> sorry if I'm way off the mark here, but wouldn't the best thing to use be NSScanner *scanner = [NSScanner localizedScannerWithString:[sender stringValue]];?  Then you don't have to worry about the specifics of number formatting in various locales.  Please let me know if I've missed the point.
>
> Ron

Hi Ron,

+localizedScannerWithString uses the user's default locale. I'm parsing strings from a web service and they're in a fixed locale, which may be different from the user's choice.

WT_______________________________________________

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:
    • NSFormatter troubles (was: NSScanner troubles)
      • From: WT <email@hidden>
References: 
 >NSScanner troubles (From: WT <email@hidden>)
 >Re: NSScanner troubles (From: Greg Parker <email@hidden>)
 >Re: NSScanner troubles (From: WT <email@hidden>)
 >Re: NSScanner troubles (From: Ken Thomases <email@hidden>)
 >Re: NSScanner troubles (From: Ron Fleckner <email@hidden>)

  • Prev by Date: Encoding UIViews take long time..
  • Next by Date: PreferencePane: To use xxx System Preferences must quit and reopen (Snow Leo 10.6.3)
  • Previous by thread: Re: NSScanner troubles
  • Next by thread: NSFormatter troubles (was: NSScanner troubles)
  • Index(es):
    • Date
    • Thread