• 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: Counting NSMutableSet
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Counting NSMutableSet


  • Subject: Re: Counting NSMutableSet
  • From: "Clark Cox" <email@hidden>
  • Date: Tue, 15 May 2007 06:44:17 -0700

On 5/15/07, Mark Hill <email@hidden> wrote:
Is there an efficient way of identifying the number of elements in an
NSMutableSet. The count function only returns the "uniqueness" of
members rather than the total.

At the moment I'm using an enumerator with an accumulating int, thus:

        NSMutableSet *mySet;
        mySet = [self mutableSetValueForKey: @"Entity"];

unsigned count = [mySet count];

:)

--
Clark S. Cox III
email@hidden
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: 
 >Counting NSMutableSet (From: "Mark Hill" <email@hidden>)

  • Prev by Date: Re: NSDictionary valueForKey: and @ character at start of NSString
  • Next by Date: Re: NSDictionary valueForKey: and @ character at start of NSString
  • Previous by thread: Counting NSMutableSet
  • Next by thread: re:Counting NSMutableSet
  • Index(es):
    • Date
    • Thread