Re: Reliable way to capitalize camel-case strings? [SOLVED]
Re: Reliable way to capitalize camel-case strings? [SOLVED]
- Subject: Re: Reliable way to capitalize camel-case strings? [SOLVED]
- From: "Michael Ash" <email@hidden>
- Date: Mon, 22 Dec 2008 08:48:52 -0500
On Mon, Dec 22, 2008 at 8:25 AM, Graham Cox <email@hidden> 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 (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