Skip to content

Instantly share code, notes, and snippets.

@nautilebleu
Created June 20, 2013 13:59
Show Gist options
  • Save nautilebleu/5822946 to your computer and use it in GitHub Desktop.
Save nautilebleu/5822946 to your computer and use it in GitHub Desktop.
Objective-C fun
#import <Foundation/Foundation.h>
int main() {
NSRange range = [NULL rangeOfString:@"whatever"];
NSLog(@"%d", range);
if (range.location != NSNotFound)
{
NSLog(@"FOUND");
} else {
NSLog(@"NOT FOUND");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment