title: how to get rid of heading and trailing white spaces from NSString
body: <p>My NSString is like this:</p>
  
  <pre><code>NSString *myString =  
  (  
  “\n \n 24 K CLUB”,  
  “\n \n 3 DOLLAR CAFE”,  
  “\n \n A PEACH OF A PARTY”,  
  “\n \n A ROYAL AFFAIR CAFE”,  
  “\n \n AFFAIRS TO REMEMBER CATERERS”,  
  “\n \n AFRIKAN DELI”  )
  </code></pre>
  
  <p><strong>How to get rid of this new line character and white spaces, so that my new string will be like:</strong>
  newString:</p>
  
  <pre><code>(
  "24 K CLUB”,  
  "3 DOLLAR CAFE”,  
  “A PEACH OF A PARTY”,  
  “A ROYAL AFFAIR CAFE”,  
  “AFFAIRS TO REMEMBER CATERERS”,  
  “AFRIKAN DELI” 
  ) 
  </code></pre>
  
  <p>I tried :   </p>
  
  <pre><code>myString = [myString stringByReplacingstringByReplacingOccurrencesOfString:@"\n" withString:@""];  
  myString = [myString stringByReplacingstringByReplacingOccurrencesOfString:@" " withString:@""];
  </code></pre>
  
  <p>but unsuccessfully..getting error:  </p>
  
  <pre><code>[__NSArrayI stringByReplacingOccurrencesOfString:withString:]: unrecognized selector sent to instance 0x7062200
  </code></pre>