• 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
Number Strings to NSDecimalNumber
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Number Strings to NSDecimalNumber


  • Subject: Number Strings to NSDecimalNumber
  • From: Andreas Grosam <email@hidden>
  • Date: Wed, 20 Jul 2011 21:54:40 +0200

I would like to parse a number string using NSDecimalNumber's decimalNumberWithString:locale: method.

All number strings are in the "C" POSIX locale, e.g.:   "-1.002e-10"
What should I set for the locale parameter (which is a NSDictionary) if I want to use the "C" Posix locale (aka "en_US_POSIX" Cocoa locale)? Would be passing NULL for the dictionary choose the "C" locale - or would this possibly choose the "default locale"?


If I want optimal performance in parsing many of number strings, what would be the recommended approach to get NSDecimalNumbers?



Thanks for tips :)
Andreas_______________________________________________

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

  • Prev by Date: Smooth resizing of a text field
  • Next by Date: Re: Smooth resizing of a text field
  • Previous by thread: Smooth resizing of a text field
  • Next by thread: [Q] Directory & File enumeration order?
  • Index(es):
    • Date
    • Thread