Re: NSScanner know-how
Re: NSScanner know-how
- Subject: Re: NSScanner know-how
- From: Thomas Deniau <email@hidden>
- Date: Sat, 26 Jul 2003 00:03:13 +0200
On Fri, 25 Jul 2003 22:04:25 +0200, Sanri Parov wrote:
>
I can't understand why NSScanner seems to confuse '#id' with
>
'#customer'...
>
Where am I'm doing my mistake?
In short, scanString: will only work if the scanner's position is just
before the given string.
So if you want to get all the IDs, before scanning #id, you have to
scan up to #id.
Hence :
if([scanner scanUpToString:id_origin intoString:NULL] && [scanner
scanString:id_origin intoString:NULL] && [scanner
scanUpToCharactersFromSet:semicolonSet intoString:&id_sql] &&
[scanner
scanString:@";" intoString:NULL]))
NSLog(@"%@",id_sql);
--
Thomas Deniau
"Unix is user friendly. It's just selective when choosing friends."
_______________________________________________
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.