Filter an array
Filter an array
- Subject: Filter an array
- From: Chris Paveglio <email@hidden>
- Date: Thu, 28 Jul 2011 13:35:32 -0700 (PDT)
I have an array of file paths, and I need to filter them to return only files with extensions I have in another array. So any files that end with {.tif, .png, .eps} etc.
I'm looking at using: - (NSArray *)filteredArrayUsingPredicate:(NSPredicate *)predicate
Is this the best option for this kind of filter? Is there any other way, aside from "doing it the long long way", i.e. enumerating over each's item's pathExtension in array1 through each file extension in array2?
Thanks,
Chris
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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