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

Re: String processing


  • Subject: Re: String processing
  • From: Andreas Mayer <email@hidden>
  • Date: Mon, 19 Mar 2007 16:48:17 +0100


Am 19.03.2007 um 16:16 Uhr schrieb James Bucanek:

While creating you're own NSScanner might work, it seems a little overkill to me.

It's not overkill. It's exactly the right tool for the job.

Regardless of whether you create an NSScanner or make this a catagory of NSString, you're still going to need to search the strings for the hyphens and capital letters.

Are you sure you understand how NSScanner works? It is the thing that *does* the searching.


I'd look at NSCharacterSet and the string search methods that use it.

Using NSString's search methods would probably be less efficient since you'd have to do what NSScanner does "by hand"; i.e. managing the scan position and partial strings.


I know that NSScanner's interface may seem a little daunting at first. But im my experience it's worth learning it.


Andreas _______________________________________________

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


References: 
 >Re: String processing (From: James Bucanek <email@hidden>)

  • Prev by Date: Re: String processing
  • Next by Date: Re: String processing
  • Previous by thread: Re: String processing
  • Next by thread: Re: String processing
  • Index(es):
    • Date
    • Thread