• 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: Parsing integers from strings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Parsing integers from strings


  • Subject: Re: Parsing integers from strings
  • From: "Cyrus Najmabadi" <email@hidden>
  • Date: Tue, 7 Oct 2008 14:49:10 -0400

Unfortunately, NSScanner seems insufficient.
It doesn't seem able to handle 64bit hexadecimal numbers.  Also, i don't see
any facility for octal numbers.

         -- Cyrus

On Tue, Oct 7, 2008 at 1:50 PM, Randall Meadows <email@hidden>wrote:

> On Oct 6, 2008, at 11:08 PM, Cyrus Najmabadi wrote:
>
>  I've been unsuccessful finding the right class in cocoa to help me parse
>> integers inside NSStrings.
>> I'm looking for something similar to java's Long.parseInt(string, radix).
>> i.e. something that can understand a stream of numbers along with a
>> specified radix (which may be 8, 10 or 16 in my use cases).
>>
>> What is available to help out here?
>>
>
> I think you'd want NSScanner.
>
_______________________________________________

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: Parsing integers from strings
      • From: mmalc crawford <email@hidden>
    • Re: Parsing integers from strings
      • From: Nick Zitzmann <email@hidden>
References: 
 >Parsing integers from strings (From: "Cyrus Najmabadi" <email@hidden>)
 >Re: Parsing integers from strings (From: Randall Meadows <email@hidden>)

  • Prev by Date: File's owner as target of button-action
  • Next by Date: Re: NSWindowController retain counts, chapter 2
  • Previous by thread: Re: Parsing integers from strings
  • Next by thread: Re: Parsing integers from strings
  • Index(es):
    • Date
    • Thread