• 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 know-how
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Re: NSScanner know-how (From: Jérôme Laurens <email@hidden>)
 >Re: NSScanner know-how (From: Sanri Parov <email@hidden>)

  • Prev by Date: Re: plist Problem
  • Next by Date: less font families
  • Previous by thread: Re: NSScanner know-how
  • Next by thread: RE: NSScanner know-how
  • Index(es):
    • Date
    • Thread