Re: count instances in an NSArray
Re: count instances in an NSArray
- Subject: Re: count instances in an NSArray
- From: Shaun Wexler <email@hidden>
- Date: Mon, 4 Oct 2004 18:19:29 -0700
On Oct 4, 2004, at 6:13 PM, Berndt Jung wrote:
I'm new to this and all, but since the NSArray is immutable, shouldn't
you know the size of the array?
Ah, I also misread his original question. He wants the number of times
a particular object is contained in an array, not just the number of
unique objects. Same principle, different class:
UInt32 countOfObject = [[NSCountedSet setWithArray:array]
countForObject:object];
;)
--
Shaun Wexler
MacFOH
http://www.macfoh.com
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden