Created
July 19, 2012 18:36
-
-
Save plantpurecode/3145880 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
@interface NSArray(JRAdditions) | |
- (id)jr_objectAtIndex:(long long)index { | |
NSUInteger realIndex = index; | |
if(index < 0) { | |
realIndex = [self count] - (+index); | |
} | |
return [self objectAtIndex:realIndex]; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Wrap-around indexes? Neat!