• 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: NSScanner Behavior
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSScanner Behavior


  • Subject: Re: NSScanner Behavior
  • From: "Louis C. Sacha" <email@hidden>
  • Date: Mon, 14 Jun 2004 22:00:39 -0700

Hello...

Does the string start with characters that are part of the skipped character set?

The default character set that is skipped is the whitespace and newline character set, so if your cronThingWarning string starts with any of those characters the string will not be matched correctly when you try to scan past it.

Hope that helps,
Louis

PS: In the unlikely event that you are using the unicode non-character U+ffff for something and it appears in the cronThingWarning string, it would be the source your problem.

I'm having an odd issue w/ NSScanner. Basically, I scan up to a
string, and then try to just skip over it once found. However, the
scanner doesn't scan over the expected string. Basically the code
looks like this:

[scanner scanUpToString:cronThingWarning intoString:&existingCrontab];
[scanner scanString:cronThingWarning intoString:nil];

I know that the string is in the document, and existingCrontab contains
all of text before the specified string, but the second line doesn't
appear to scan the string. Why would this happen?

-Zach
_______________________________________________
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: 
 >NSScanner Behavior (From: Zach Paine <email@hidden>)

  • Prev by Date: Re: Allocation in Pools and threads
  • Next by Date: Re: Image Alignment In Scrolled View?
  • Previous by thread: NSScanner Behavior
  • Next by thread: Secure NSString?
  • Index(es):
    • Date
    • Thread