Skip to content

Instantly share code, notes, and snippets.

@mikeabdullah
Created April 24, 2012 14:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikeabdullah/2480126 to your computer and use it in GitHub Desktop.
Save mikeabdullah/2480126 to your computer and use it in GitHub Desktop.
Calling equality testing methods on nil
NSString *string = nil;
BOOL result = [string isEqualToString:@""];
NSNumber *number = nil;
BOOL result = [number isEqualToNumber:[NSNumber numberWithInt:0]];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment