diff options
Diffstat (limited to 'macosx/NSArray+HBAdditions.m')
-rw-r--r-- | macosx/NSArray+HBAdditions.m | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/macosx/NSArray+HBAdditions.m b/macosx/NSArray+HBAdditions.m index f24417632..1bea369a8 100644 --- a/macosx/NSArray+HBAdditions.m +++ b/macosx/NSArray+HBAdditions.m @@ -20,6 +20,18 @@ return YES; } +- (BOOL)containsWhere:(BOOL (^)(id object))block +{ + for (id object in self) + { + if (block(object) == YES) + { + return YES; + } + } + return NO; +} + - (NSArray *)filteredArrayUsingBlock:(BOOL (^)(id object))block { NSMutableArray *filteredArray = [NSMutableArray array]; |