Skip to content

Instantly share code, notes, and snippets.

@michaelochs
Created July 11, 2013 11:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save michaelochs/5974839 to your computer and use it in GitHub Desktop.
Save michaelochs/5974839 to your computer and use it in GitHub Desktop.
NSIndexSet subscripting support
@implementation NSNumber (Subscripting)
// call it like this: [@0:1];
- (NSIndexSet*):(NSUInteger)length
{
return [NSIndexSet indexSetWithIndexesInRange:NSMakeRange([self unsignedIntegerValue], length)];
}
@end
@Ricardo1980
Copy link

Awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment