2013-04-10 22:43:41 -07:00
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
|
|
|
|
|
|
int main()
|
|
|
|
|
{
|
2014-04-02 16:56:35 +00:00
|
|
|
@autoreleasepool {
|
2013-04-10 22:43:41 -07:00
|
|
|
|
2014-04-02 16:56:35 +00:00
|
|
|
NSArray *a = @[@1, @3, @4, @5, @6, @7, @8, @9, @10];
|
|
|
|
|
NSLog(@"6 is at position %lu", [a indexOfObject:@6
|
|
|
|
|
inSortedRange:NSMakeRange(0, [a count])
|
|
|
|
|
options:0
|
|
|
|
|
usingComparator:^(id x, id y){ return [x compare: y]; }]); // prints 4
|
2013-04-10 22:43:41 -07:00
|
|
|
|
2014-04-02 16:56:35 +00:00
|
|
|
}
|
2013-04-10 22:43:41 -07:00
|
|
|
return 0;
|
|
|
|
|
}
|