Re: Removing duplicates from NSMutableArray
Re: Removing duplicates from NSMutableArray
- Subject: Re: Removing duplicates from NSMutableArray
- From: Tomas Zahradnicky <email@hidden>
- Date: Mon, 2 Dec 2002 23:31:36 +0100
What is the best way to filter out duplicate NSStrings from an
NSMutableArray? I can think of one way I could probably do it, but
it seems pretty inefficient. Any suggestions?
I'm not a skilled cocoa developer, but I'd made set from the array
and get the set back as an array. This should definitely work.
uniquearray = [[NSSet setWithArray:yourarray] allObjects];
-Tomas
--
# Tomas Zahradnicky, Jr
# The Czech Technical University
# Dept of Computer Science, FEE-CTU Prague
_______________________________________________
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.