• 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: Convert spelled out numbers to digits?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Convert spelled out numbers to digits?


  • Subject: Re: Convert spelled out numbers to digits?
  • From: Kirk <email@hidden>
  • Date: Wed, 27 Mar 2013 14:51:10 -0500

   NSNumberFormatter * nf = [[NSNumberFormatter new] autorelease];
   [nf setNumberStyle: NSNumberFormatterSpellOutStyle];
   NSLog(@"Survey Says...%@", [nf numberFromString:@"three"]);

Yields "Survey Says...3"

** Also worked with "seventy-three" and "thirteen point five" **

This was under iOS.

Personally, I was gobsmacked at the results.

Kirk Kerekes
(iPhone)
_______________________________________________

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: Convert spelled out numbers to digits?
      • From: "Eric E. Dolecki" <email@hidden>
  • Prev by Date: Re: Working Programmatically with Bound Controller's Selection
  • Next by Date: Custom insertion point
  • Previous by thread: Re: Convert spelled out numbers to digits?
  • Next by thread: Re: Convert spelled out numbers to digits?
  • Index(es):
    • Date
    • Thread