• 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: NSString and string contains
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSString and string contains


  • Subject: Re: NSString and string contains
  • From: Jens Alfke <email@hidden>
  • Date: Sun, 2 Mar 2008 22:50:15 -0800


On 2 Mar '08, at 1:44 PM, Andrew Merenbach wrote:

You probably want to use enumerators and something like the following code:

That's debatable. Personally, I hate using NSEnumerator because it's slow. (Not only does it create an autoreleased enumerator object, but most of the standard collection enumerators copy the collections they enumerate over.)


On the other hand, using fast enumeration via the "for...in..." syntax in ObjC-2 is a total win. Not only is the syntax clear, but the implementation is very efficient (faster than -objectAtIndex, much faster than NSEnumerator.)

—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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

References: 
 >NSString and string contains (From: Tom Jones <email@hidden>)
 >Re: NSString and string contains (From: Andrew Merenbach <email@hidden>)

  • Prev by Date: Re: NSString and string contains
  • Next by Date: Re: Spotlight importer for records
  • Previous by thread: Re: NSString and string contains
  • Next by thread: Re: NSString and string contains
  • Index(es):
    • Date
    • Thread