Skip to content

Instantly share code, notes, and snippets.

@psobko
Forked from michaelochs/NSNumber+Subscripting.m
Created August 16, 2014 00:48
Show Gist options
  • Save psobko/0451171ccba43e5af4b9 to your computer and use it in GitHub Desktop.
Save psobko/0451171ccba43e5af4b9 to your computer and use it in GitHub Desktop.
@implementation NSNumber (Subscripting)
// call it like this: [@0:1];
- (NSIndexSet*):(NSUInteger)length
{
return [NSIndexSet indexSetWithIndexesInRange:NSMakeRange([self unsignedIntegerValue], length)];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment