Skip to Content

CSStringTokenizer, a Cocoa Touch front end for tokenizing strings

Have you ever wanted to work with rather deep elements of Core Foundation in the iPhone SDK with some sort of front end? August Joki has just come up with a project that provides a Cocoa Touch wrapper for the CFStringTokenizer type in the Core Foundation framework.

As you can see in the screen shot at right, the demo provides various aspects about the current string including the string in a letter, word, or using a WordBoundary. It works just like CFStringTokenizer can, but can be accessed using this front-end.

If you're wondering what CFStringTokenizer actually is, it's useful for breaking a string into a token, which can specified by words, sentences, or paragraphs. You're also able to further modify the tokenization once you break it down.

This is something that's going to be useful for iPhone developers who like to work with a Cocoa Touch interface to bring lower-level elements of the iPhone OS into their apps, and also to developers who work with natural language strings.

To download this project, go over to the cocoa-stringtokenizer project page on GitHub.

Categories

Developer iPhone SDK iPod touch

Have you ever wanted to work with rather deep elements of Core Foundation in the iPhone SDK with some sort of front end? August Joki has...
 

Add a Comment

*0 / 3000 Character Maximum

5 Comments

Filter by:
macxprt

I thought we were past the days of assigning or referring things as "tokens". Sigh... we still have a long way to go, Dr. King.

October 27 2009 at 2:56 PM Report abuse rate up rate down Reply
Dave

For serious parsing needs, ParseKit (http://www.parsekit.com/) is a wonderful alternative.

October 27 2009 at 10:41 AM Report abuse rate up rate down Reply
rob

Thought I'd mention that for simple cases NSString's "componentsSeparatedByString:" method should suffice:

http://developer.apple.com/mac/library/DOCUMENTATION/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSString.html#//apple_ref/occ/instm/NSString/componentsSeparatedByString:

October 27 2009 at 10:37 AM Report abuse rate up rate down Reply
betafrog

I believe you've misspelled the title of the article.. No?

October 27 2009 at 10:36 AM Report abuse rate up rate down Reply
Rafe H.

Why yes, Huang, that would be a challenging paragraph to tokenize!

October 27 2009 at 9:42 AM Report abuse rate up rate down Reply
Buy an ad here

Hot Apps on TUAW

Tweets

© 2012 AOL Inc. All Rights Reserved.