Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: compare two array



If these containers don't have to be arrays, investigate the NSSet. Such operations are much more efficient on sets rather than iterating through an entire array for every element in question from the other.

On Apr 1, 2006, at 8:03 PM, Jerry Krinock wrote:

on 06/04/01 16:50, Yorh at email@hidden wrote:

I have two Arrays onr with a varibla number of objects and the second
one too.
I have to remove from the first array the object that isn't present
in the second one, but I can't find if there is some method to do it...

I don't believe there is. Write your own method and put it in a category to
NSMutableArray. Enumerate through the second array using - indexOfObject.



_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden

References: 
 >Re: compare two array (From: Jerry Krinock <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.