• 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: iPhone: validate a NSString for US zipcode
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: iPhone: validate a NSString for US zipcode


  • Subject: Re: iPhone: validate a NSString for US zipcode
  • From: David Duncan <email@hidden>
  • Date: Thu, 7 Jan 2010 14:41:32 -0800

I can say I meant it in the way that BJ describes. However, the Cocoa documentation does describe them in the way that Dave states, so consider my sense on this particular point reversed :).

On Jan 7, 2010, at 2:17 PM, BJ Homer wrote:

> Well, depends on what you mean by ordered. NSArray retains insertion order.
> NSSet does not. But NSSet may be sorting things on insertion (like you'd get
> with a binary tree structure), while NSArray cannot assume any particular
> order. So from the NSArray implementor's standpoint, the array is unordered.
>
> On Thu, Jan 7, 2010 at 2:52 PM, Dave DeLong <email@hidden> wrote:
>
>> That's backwards.  NSArray is ordered; NSSet is not.
>>
>>
>>> On Jan 7, 2010, at 2:44 PM, David Duncan wrote:
>>>
>>>
>>> Since NSArray is unordered I would not expect its containsObject to do
>>
>>> better than O(n). If NSSet is an ordered container, it should be able to do
>>> O(lg n).

--
David Duncan
Apple DTS Animation and Printing

_______________________________________________

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: 
 >iPhone: validate a NSString for US zipcode (From: "Eric E. Dolecki" <email@hidden>)
 >Re: iPhone: validate a NSString for US zipcode (From: Paul Bruneau <email@hidden>)
 >Re: iPhone: validate a NSString for US zipcode (From: "Eric E. Dolecki" <email@hidden>)
 >Re: iPhone: validate a NSString for US zipcode (From: David Duncan <email@hidden>)
 >Re: iPhone: validate a NSString for US zipcode (From: Paul Bruneau <email@hidden>)
 >Re: iPhone: validate a NSString for US zipcode (From: David Duncan <email@hidden>)
 >Re: iPhone: validate a NSString for US zipcode (From: Dave DeLong <email@hidden>)
 >Re: iPhone: validate a NSString for US zipcode (From: BJ Homer <email@hidden>)

  • Prev by Date: Re: iPhone: validate a NSString for US zipcode
  • Next by Date: Re: iPhone: validate a NSString for US zipcode
  • Previous by thread: Re: iPhone: validate a NSString for US zipcode
  • Next by thread: Re: iPhone: validate a NSString for US zipcode
  • Index(es):
    • Date
    • Thread