Add missing array filtering functionality

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@25056 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2007-04-15 09:50:48 +00:00
parent b6c9a9e42a
commit 06d1115491
3 changed files with 38 additions and 4 deletions

View file

@ -51,9 +51,19 @@ extern "C" {
@end
@interface NSArray (NSPredicate)
/** Evaluate each object in the array using the specified predicate and
* return an array containing all the objects which evaluate to YES.
*/
- (NSArray *) filteredArrayUsingPredicate: (NSPredicate *)predicate;
@end
@interface NSMutableArray (NSPredicate)
/** Evaluate each object in the array using the specified predicate and
* remove each objects which evaluates to NO.
*/
- (void) filterUsingPredicate: (NSPredicate *)predicate;
@end
#if defined(__cplusplus)
}
#endif