title: How to identify and remove newline and white spaces?
body: <p>I am making an nsmutable array by separating a string by component it is causing a lot of new line and white spaces to be inserted in the array how to identify and remove them?</p>
  
  <pre><code>for (int i=0;i&lt;contentsOfFile.count; i++) 
   {
          if(!([[contentsOfFile objectAtIndex:i]isEqual:@"\n"]||[[contentsOfFile     objectAtIndex:i]isEqual:@""]))
         [arrayToBereturned addObject:[contentsOfFile objectAtIndex:i]];
   }
  </code></pre>
  
  <p>this code which i am using cannot identify all new line charectors
  thanks</p>