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

RE: multiple componentsSeparatedByString


  • Subject: RE: multiple componentsSeparatedByString
  • From: Koen van der Drift <email@hidden>
  • Date: Sat, 23 Nov 2002 19:12:45 -0500

At 12:34 PM -0500 11/23/02, Koen van der Drift wrote:

>
>How can I fix this?
>


I found another solution. Instead of using an NSScanner, I just extract
each character from the string and test it against the NSCharacterSet:

unichar buf;

for ( i = 0; i < [s length]; i++ )
{
buf = [s characterAtIndex:i];

if ([stopSet characterIsMember:buf])
{
// make substring
// add substring to array
....


Seems to work so far :)

- Koen.
_______________________________________________
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: multiple componentsSeparatedByString (From: "Jonathan E. Jackel" <email@hidden>)
 >RE: multiple componentsSeparatedByString (From: Koen van der Drift <email@hidden>)

  • Prev by Date: Re: NSString and NSCopying Protocol
  • Next by Date: Re: An interesting localisation issue
  • Previous by thread: RE: multiple componentsSeparatedByString
  • Next by thread: Re: multiple componentsSeparatedByString
  • Index(es):
    • Date
    • Thread