Re: Did I find a NSScanner bug, or am I doing this all wrong?
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