Created
October 19, 2009 04:18
-
-
Save hammerdr/213072 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@implementation CPArray (Find) | |
- (CPObject)findBy:(Function)isTheObject | |
{ | |
for(int i = 0; i < [self count]; i++) | |
{ | |
if(isTheObject([self objectAtIndex:i])) | |
{ | |
return [self objectAtIndex:i]; | |
} | |
} | |
return nil; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment