• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Reliable way to capitalize camel-case strings? [SOLVED]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Reliable way to capitalize camel-case strings? [SOLVED]
      • From: Jean-Daniel Dupas <email@hidden>
References: 
 >Reliable way to capitalize camel-case strings? (From: Graham Cox <email@hidden>)
 >Re: Reliable way to capitalize camel-case strings? (From: Rob Rix <email@hidden>)
 >Re: Reliable way to capitalize camel-case strings? [SOLVED] (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: Reliable way to capitalize camel-case strings?
  • Next by Date: Re: warning: unused parameter '_value'
  • Previous by thread: Re: Reliable way to capitalize camel-case strings? [SOLVED]
  • Next by thread: Re: Reliable way to capitalize camel-case strings? [SOLVED]
  • Index(es):
    • Date
    • Thread