Skip navigation.
 
mlRe: count instances in an NSArray
FROM : Jonathan 'Wolf' Rentzsch
DATE : Tue Oct 05 19:41:04 2004

Shaun Wexler, <email_removed>, 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"

Related mailsAuthorDate
mlcount instances in an NSArray Jonathan 'Wolf' Re… Oct 5, 02:13
mlRe: count instances in an NSArray Shaun Wexler Oct 5, 03:04
mlRe: count instances in an NSArray Shaun Wexler Oct 5, 03:19
mlRe: count instances in an NSArray Jonathan 'Wolf' Re… Oct 5, 19:41
mlRe: count instances in an NSArray Jonathan 'Wolf' Re… Oct 5, 20:04