title: How to determine if strings are equal in Objective C?
body: <p>I read a string from a JSON result as follows:</p>
  
  <pre><code>NSString *strResult = [[NSString alloc] initWithBytes:[data bytes] 
                                                 length:[data length] 
                                               encoding:NSUTF8StringEncoding]; 
  </code></pre>
  
  <p>I then try to determine if the string is equal to the value "N"</p>
  
  <pre><code>if ([strResult isEqualToString:@"N"])
  { 
    [lblImageOK setHidden:YES]; 
  } 
  else 
  { 
    [lblImageOk setHidden:NO]; 
  }
  </code></pre>
  
  <p>The if statement allways returns the else part, even though the result is "N". They both have the same value but the statement returns false always.</p>