Posted By

tgunr on 03/21/07


Tagged

cocoa objc macdev


Versions (?)


Advertising

Submit Site


Who likes this?

2 people have marked this snippet as a favorite

tcol
davidsi


DMCommonMacros


Published in: Objective C 



Website Promotion
DIRECTORY
is a crucial factor for all websites that need to gain better organic search engine rankings and increase website traffic.
Submitting your website as part of your Web Promotion strategy to our SEO friendly and high traffic Business Directory for review is an excellent way to gain a valuable backlink and increase your websites visibility online.

Submit Site


URL: http://www.wilshipley.com/blog/2005/10/pimp-my-code-interlude-free-code.html

Expand | Embed | Plain Text
  1. DMCommonMacros.h
  2. static inline BOOL IsEmpty(id thing) {
  3. return thing == nil
  4. || ([thing respondsToSelector:@selector(length)]
  5. && [(NSData *)thing length] == 0)
  6. || ([thing respondsToSelector:@selector(count)]
  7. && [(NSArray *)thing count] == 0);
  8. }

Report this snippet 

You need to login to post a comment.

Download royalty free graphics