Skip to content

Instantly share code, notes, and snippets.

@nateflink
Created August 14, 2013 16:20
Show Gist options
  • Save nateflink/6232717 to your computer and use it in GitHub Desktop.
Save nateflink/6232717 to your computer and use it in GitHub Desktop.
static inline BOOL IsEmpty(id thing) { return thing == nil || ([thing respondsToSelector:@selector(length)] && [(NSData *)thing length] == 0) || ([thing respondsToSelector:@selector(count)] && [(NSArray *)thing count] == 0); }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment