• 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
String processing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

String processing


  • Subject: String processing
  • From: Robert Walker <email@hidden>
  • Date: Mon, 19 Mar 2007 10:58:45 -0400

Hello group,

I'm still new to Cocoa and want to make sure I'm on track with implementing some basic string processing methods.

I have a need to "camelize" some strings. I have some strings representing XML tags in the format "some-tag-name" and I want to process this string into "someTagName" and I'll also need to convert "someTagName" into "some-tag-name" format.

In my research for a solution it appears to me that NSScanner may be used to do this conversion. I was thinking of creating a category on NSString and using NSScanner to search for instances of the dash. But, I'm not sure if this will work for converting the other direction. Is there a convenient way to scan for capital letters using NSScanner? Is NSScanner actually useful here or is there a better way to do this?

I don't mind doing the research myself, but if someone could point me in the right direction that would be great.
--
Robert Walker
email@hidden




_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: String processing
      • From: Andreas Mayer <email@hidden>
    • Re: String processing
      • From: James Bucanek <email@hidden>
  • Prev by Date: Re: Changing order of views dynamically
  • Next by Date: Re: String processing
  • Previous by thread: Re: Parsing "Set-Cookie" HTTP Response
  • Next by thread: Re: String processing
  • Index(es):
    • Date
    • Thread