title: replaceObjectAtIndex:withObject: Error
body: <p>Can someone see where the error is here... </p>
  
  <pre><code>NSArray *arr = [str componentsSeparatedByString:@","];
  NSString *inputStr = [arr objectAtIndex:0];
  NSString *trimmedStr = [inputStr stringByTrimmingCharactersInSet:
                                 [NSCharacterSet whitespaceAndNewlineCharacterSet]]; 
  [[arr objectAtIndex:0] replaceObjectAtIndex:0 withObject:trimmedStr];   
  </code></pre>
  
  <p>output:</p>
  
  <pre><code>-[__NSCFString replaceObjectAtIndex:withObject:]: 
  unrecognized selector sent to instance 0x68a8eb0
  *** Terminating app due to uncaught exception 'NSInvalidArgumentException', 
  reason: '-[__NSCFString replaceObjectAtIndex:withObject:]: 
  unrecognized selector sent to instance 0x68a8eb0'
  </code></pre>
  
  <p>EDIT: added extra line to show that the array has been declared and populated.<br>
  So as said in comment below, when I replace the line:</p>
  
  <pre><code>[[arr objectAtIndex:0] replaceObjectAtIndex:0 withObject:trimmedStr];  
  </code></pre>
  
  <p>with:</p>
  
  <pre><code>[arr replaceObjectAtIndex:0 withObject:trimmedStr];  
  </code></pre>
  
  <p>Xcode error(before running):</p>
  
  <pre><code> No visible @interface for 'NSArray' declares the selector 'replaceObjectAtIndex:withObject'
  </code></pre>