You could try using - (NSRange)rangeOfComposedCharacterSequenceAtIndex:
(NSUInteger)index; and see if the range is >1. But right now, I'm
watching the highly informative humorist Glenn Beck.
Oh, >1 was to pass over surrogate pairs, so you don't pass over
anything.
But honestly, you should never have a reason to use
charactersAtIndex:. It's too similar to treating a string as a bucket
of bits instead of strings.
Instead, might I suggest creating a character set of all your "ending
sentences thingamajigs" and then use -
rangeOfCharacterFromSet:options:range: and break it up from there.
On Apr 7, 2009, at 11:54 AM, Тимофей Даньшин wrote:
I will now have to find another "unicode-safe" way to split the
string into sentences.
---
Sincerely,
Rosyna Keller
Technical Support/Carbon troll/Always needs a hug
Unsanity: Unsane Tools for Insanely Great People
It's either this, or imagining Phil Schiller in a thong.
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to arch...@mail-archive.com