1 #import "ITCategory-NSArray.h"
3 @implementation NSArray (ITFoundationCategory)
5 - (NSArray *)objectsForKey:(NSString *)key {
6 NSMutableArray *array = [[[NSMutableArray alloc] initWithCapacity:[self count]] autorelease];
7 NSEnumerator *enumerator = [self objectEnumerator];
10 while ( (anItem = [enumerator nextObject]) ) {
12 id itemObject = [anItem objectForKey:key];
15 [array addObject:itemObject];
17 [array addObject:[NSNull null]];
24 - (BOOL)containsString:(NSString *)string {
25 NSEnumerator *enumerator = [self objectEnumerator];
29 while ( (anItem = [enumerator nextObject]) ) {
31 if ( [anItem isEqual:string] ) {