Re: NSScanner baffling behaviour (scanString:intoString: doesn't work!)
Re: NSScanner baffling behaviour (scanString:intoString: doesn't work!)
- Subject: Re: NSScanner baffling behaviour (scanString:intoString: doesn't work!)
- From: j o a r <email@hidden>
- Date: Tue, 8 Apr 2003 16:34:24 +0200
My code snipped was just quickly hacked together in Mail and not tested
at all - but I don't think it would fail the scenario that you
describe. I don't see why "scanUpToString:" wouldn't work if the search
string is at the beginning of the scanned string. Please test it and
let me know if you find that I'm wrong.
j o a r
On Tuesday, Apr 8, 2003, at 16:29 Europe/Stockholm, Greg Hurrell wrote:
If the string to be scanned is something like, "<title>Hi
there</title>", and the startTag that you are scanning for is
"<title>", then will your first [scanner scanUpToString:startTag
infoString:nil] not return NO, and hence you'll never pass the "if"
statement?
Would this code not be susceptible to that problem?
_______________________________________________
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.