On Mon, Dec 22, 2008 at 8:25 AM, Graham Cox <graham....@bigpond.com> wrote:
>
> I ended up writing this category method. I guess it will be reliable, as
> it's making no assumptions about encoding.

Actually it is! It assumes that the first character is the first
"character". You'll want to stick in a call to
-rangeOfComposedCharacterSequenceAtIndex: if you want to be 100%
universal.

However I would not hesitate to assume ASCII. The language only allows
ASCII in identifiers, so you can't define, declare, or call a
non-ASCII method directly in code. You could do so by building one at
runtime, but if you're doing such a crazy thing then you deserve
whatever poor behavior you get!

Mike
_______________________________________________

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

Reply via email to