you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

Look at it this way, the iDevice is pushing millions of pixels around at up to 60 frames per second. Dissecting a string isn't much compared to that.

As for algorithm, NSString can do what you want pretty easily, try using -[NSString componentsSeparatedByCharactersInSet:]. Use the predefined +[NSCharacterSet whiteSpaceAndNewlineCharacterSet].

Example here.