X-Git-Url: http://git.ithinksw.org/ITFoundation.git/blobdiff_plain/034559d9a2f0b8e607b0365152b9c73732f00e6e..2c8e10b58c81bf1170d3ed8df82b606f0815285f:/ITCategory-NSArray.m diff --git a/ITCategory-NSArray.m b/ITCategory-NSArray.m deleted file mode 100644 index 13aeb0c..0000000 --- a/ITCategory-NSArray.m +++ /dev/null @@ -1,39 +0,0 @@ -#import "ITCategory-NSArray.h" - -@implementation NSArray (ITFoundationCategory) - -- (NSArray *)objectsForKey:(NSString *)key { - NSMutableArray *array = [[[NSMutableArray alloc] initWithCapacity:[self count]] autorelease]; - NSEnumerator *enumerator = [self objectEnumerator]; - id anItem; - - while ( (anItem = [enumerator nextObject]) ) { - - id itemObject = [anItem objectForKey:key]; - - if ( itemObject ) { - [array addObject:itemObject]; - } else { - [array addObject:[NSNull null]]; - } - } - - return array; -} - -- (BOOL)containsString:(NSString *)string { - NSEnumerator *enumerator = [self objectEnumerator]; - id anItem; - BOOL result = NO; - - while ( (anItem = [enumerator nextObject]) ) { - - if ( [anItem isEqual:string] ) { - result = YES; - } - } - - return result; -} - -@end \ No newline at end of file