/Frameworks/OJMoq/CPArray+Find.j
http://github.com/hammerdr/OJTest · Unknown · 16 lines · 13 code · 3 blank · 0 comment · 0 complexity · a83a9e6fc0e53715a3b3b80b4eb0d0e4 MD5 · raw file
- @implementation CPArray (Find)
- - (CPObject)findBy:(Function)isTheObject
- {
- for(var i = 0; i < [self count]; i++)
- {
- if(isTheObject([self objectAtIndex:i]))
- {
- return [self objectAtIndex:i];
- }
- }
-
- return nil;
- }
- @end