Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSScanner (was Re: multiple componentsSeparatedByString)



> while (! [scanner isAtEnd])
> {
> if ([scanner scanUpToCharactersFromSet: stopSet intoString:&result] &&
> [scanner scanCharactersFromSet:stopSet intoString:&nil])
> {
> [anArray addObject:result];
> }
> }

There may be problem with this snippet. When the first character in the
scanned string is a member of stopSet, addObject will not be called, and
the while loop runs infinite. Is there a way around this?

thanks,

- Koen.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: multiple componentsSeparatedByString (From: Jonathan Jackel <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.