• 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: Removing duplicates from NSMutableArray
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Removing duplicates from NSMutableArray


  • Subject: Re: Removing duplicates from NSMutableArray
  • From: "John C. Randolph" <email@hidden>
  • Date: Mon, 2 Dec 2002 18:45:20 -0800

On Monday, December 2, 2002, at 06:26 PM, Dan Wood wrote:

Well, if you're just using dummy values as the objects in a dictionary, then why not just use an NSSet instead?

That may be worth a try. I'm not sure whether NSMutableSet will check a string with -isEqual or -hash to see if it's the same as an object it's already got, though.

OK, I just tried it: NSMutableSet does the right thing when adding identical strings to the set. Cool.

-jcr


John C. Randolph <email@hidden> (408) 974-8819
Sr. Cocoa Software Engineer,
Apple Worldwide Developer Relations
http://developer.apple.com/cocoa/index.html
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Removing duplicates from NSMutableArray (From: Dan Wood <email@hidden>)

  • Prev by Date: Re: Removing duplicates from NSMutableArray
  • Next by Date: Re: Removing duplicates from NSMutableArray
  • Previous by thread: Re: Removing duplicates from NSMutableArray
  • Next by thread: Re: Removing duplicates from NSMutableArray
  • Index(es):
    • Date
    • Thread