title: Why does -[NSString compare:options:] return true when the strings are not equal?
body: <p>I am checking if a string appears twice in a row within an array. This code doesn't seem to work, as it just prints out the entire array. What am I missing?</p>
  
  <pre><code>NSString *nameString =
      [NSString stringWithContentsOfFile:@"/usr/share/dict/words"
                                encoding:NSUTF8StringEncoding
                                   error:NULL];
  
  NSArray *names = [nameString componentsSeparatedByString:@"\n"];
  
  //Save last item
  NSMutableString *lastOne = [NSMutableString stringWithCapacity:20];
  
  // Go through the array one string at a time
  for (NSString *n in names) {
  
      if ([n compare:lastOne options:NSCaseInsensitiveSearch]) {
          NSLog(@"%@", n);
      }
  
      [lastOne setString:n];
  
  
  }
  </code></pre>