• 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: parsing a string into words
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: parsing a string into words


  • Subject: Re: parsing a string into words
  • From: Alastair Houghton <email@hidden>
  • Date: Sun, 26 Apr 2009 15:01:23 +0100

On 26 Apr 2009, at 04:33, Jeffrey Oleander wrote:

NSArray * tokens = [string componentsSeparatedByCharactersInSet: whitespaceCharacterSet];

No, no, no. If you read Gerriet's original post, you would have noticed that he even explained that what you just said won't work, because not all languages use whitespace to separate words like English does.


You probably want to be using CFStringTokenizer(), at least on OS X. For cross-platform code, ICU is probably your best bet.

Kind regards,

Alastiar.

--
http://alastairs-place.net



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: parsing a string into words (From: Jeffrey Oleander <email@hidden>)

  • Prev by Date: Re: Multiple cell in a table column
  • Next by Date: Re: FSPathCopyObjectSync and symbolic links?
  • Previous by thread: Re: parsing a string into words
  • Next by thread: Re: parsing a string into words
  • Index(es):
    • Date
    • Thread