Re: NSScanner Behavior
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.