• 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
NSScanner (was Re: multiple componentsSeparatedByString)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSScanner (was Re: multiple componentsSeparatedByString)


  • Subject: NSScanner (was Re: multiple componentsSeparatedByString)
  • From: Koen van der Drift <email@hidden>
  • Date: Fri, 29 Nov 2002 14:02:30 -0500

> 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.

  • Follow-Ups:
    • Re: NSScanner (was Re: multiple componentsSeparatedByString)
      • From: Jonathan Jackel <email@hidden>
References: 
 >Re: multiple componentsSeparatedByString (From: Jonathan Jackel <email@hidden>)

  • Prev by Date: Re: Combo Box Problem
  • Next by Date: Re: An interesting link
  • Previous by thread: Re: multiple componentsSeparatedByString
  • Next by thread: Re: NSScanner (was Re: multiple componentsSeparatedByString)
  • Index(es):
    • Date
    • Thread