Re: count instances in an NSArray
Re: count instances in an NSArray
- Subject: Re: count instances in an NSArray
- From: "Jonathan 'Wolf' Rentzsch" <email@hidden>
- Date: Tue, 5 Oct 2004 12:41:04 -0500
Shaun Wexler, email@hidden, wrote:
>
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];
Good idea. This project still targets 10.1, which is pre-NSCountedSet,
but I'll use this in other projects. Thanks!
| Jonathan 'Wolf' Rentzsch
http://rentzsch.com
| Red Shed Software
http://redshed.net
| "better" necessarily means "different"
_______________________________________________
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