• 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: Did I find a NSScanner bug, or am I doing this all wrong?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Did I find a NSScanner bug, or am I doing this all wrong?


  • Subject: Re: Did I find a NSScanner bug, or am I doing this all wrong?
  • From: "Stephen J. Butler" <email@hidden>
  • Date: Mon, 22 Sep 2008 01:21:42 -0500

On Mon, Sep 22, 2008 at 1:15 AM, Britt Durbrow
<email@hidden> wrote:
> I'm getting some really odd behavior out of NSScanner; it seems to be
> choking on character sets that only have whitespace in them.

Your problem is that you need to set the characters to be skipped to
something other than what you are trying to scan.

<file://localhost/Developer/Documentation/DocSets/com.apple.ADC_Reference_Library.CoreReference.docset/Contents/Resources/Documents/documentation/Cocoa/Reference/Foundation/Classes/NSScanner_Class/Reference/Reference.html#//apple_ref/doc/uid/20000159-setCharactersToBeSkipped_>

I can't remember if nil works, or you need [NSCharacterSet
characterSetWithCharactersInString:@""]. But one of those two will
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:
    • [SOLVED] Did I find a NSScanner bug, or am I doing this all wrong?
      • From: Britt Durbrow <email@hidden>
References: 
 >Did I find a NSScanner bug, or am I doing this all wrong? (From: Britt Durbrow <email@hidden>)

  • Prev by Date: Re: Programmatically inserting text into NSTextView and scrolling
  • Next by Date: Re: Finding other apps' paths - deterministically!
  • Previous by thread: Did I find a NSScanner bug, or am I doing this all wrong?
  • Next by thread: [SOLVED] Did I find a NSScanner bug, or am I doing this all wrong?
  • Index(es):
    • Date
    • Thread