title: iOS indexOfObjectIdenticalTo: not working for strings
body: <p>I've seen similar questions about NSArray's <code>indexOfObjectIdenticalTo:</code> method, but I'm hoping my asking it simply will yield simple answers.  Is it useless for searching for strings that are programmatically built?</p>
  
  <pre><code>NSArray* theArray = [[NSArray alloc] initWithObjects:@"John", nil];
  NSString* searchString1 = @"John";
  NSString* stringComponent = @"Jo";
  NSString* searchString2 = [stringComponent stringByAppendingFormat:@"hn"];
  
  BOOL testContains1 = [theArray containsObject:searchString1];
  int  testIndex1    = [theArray indexOfObjectIdenticalTo:searchString1];
  BOOL testContains2 = [theArray containsObject:searchString2];
  int  testIndex2    = [theArray indexOfObjectIdenticalTo:searchString2];
  </code></pre>
  
  <p>In the example above, <code>testContains1</code> and <code>testContains2</code> both return the same value, which is <code>true</code>.  But <code>testIndex1</code> and <code>testIndex2</code> differ; <code>testIndex1</code> is 0 because it found an identical object at index 0 as expected, but unfortunately <code>testIndex2</code> is 2147483647 (NSNotFound).</p>