title: How to compare size of string in Objective-C?
body: <p>I have an NSString in Objective-C that I want to find the size of and then compare it to some number; however, I'm not sure what the proper way to do this is?</p>
  
  <p>What I have so far is a property called <code>display</code> which is a <code>UILabel *</code> and what I'm thinking of doing is the following:</p>
  
  <pre><code>NSUInteger size = [self.display.text length];
  </code></pre>
  
  <p>However, now I want to compare this size with a <code>0</code>.  But I'm not sure what the proper way to do this?  I've thought of doing the following, but for some reason this doesn't seem right:</p>
  
  <pre><code>if(size == 1) { doSomething};
  </code></pre>
  
  <p>Any help?  Thanks</p>