• 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: Separate string/file into "words"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Separate string/file into "words"


  • Subject: Re: Separate string/file into "words"
  • From: Will Koffel <email@hidden>
  • Date: Mon, 27 Mar 2006 21:58:38 -0500

Yeah, sorry, meant to mention that I looked at NSScanner. It seemed mostly suited for scanning other data types out of a string, rather than splitting into more strings, but it appears that:

- (BOOL)scanUpToCharactersFromSet:(NSCharacterSet *)stopSet intoString:(NSString **)stringValue

might be what I'm looking for. Thanks for pointing me back in that direction.

-Will

On Mar 27, 2006, at 8:59 PM, Chas Spillar wrote:

I think there is an NSScanner class that may be more of what you want...

Chas.


From: Will Koffel <email@hidden>
Date: Mon, 27 Mar 2006 14:02:32 -0500
To: Cocoa Cocoa-Dev <email@hidden>
Subject: Separate string/file into "words"

I'm wondering if there's a tricky way that I'm missing to split a
file on whitespace.  NSString's componentsSeparatedByString:(NSString
*) is a little unflexible in that regards.  Something more like
componentsSeparatedByCharacterSet:(NSCharacterSet *) that split on
any of the included characters?

Couldn't find any examples online, thought I'd ask before
implementing myself (and having to sweat the performance implications
I might introduce).

-Will

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden



!DSPAM:4428988920471804284693!


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Re: Separate string/file into "words" (From: Chas Spillar <email@hidden>)

  • Prev by Date: Re: About AsyncSocket class
  • Next by Date: Re: Separate string/file into "words"
  • Previous by thread: Re: Separate string/file into "words"
  • Next by thread: Re: Separate string/file into "words"
  • Index(es):
    • Date
    • Thread