title: how to use stringByTrimmingCharactersInSet in NSString
body: <p>I have a string  which gives the Date (below)</p>
  
  <pre><code>NSString*str1=[objDict objectForKey:@"date"];
  
   NSLog(@" str values2%@",str1); --&gt; 04-Jan-13
  </code></pre>
  
  <p>Now Problem is I need to Trim the<code>"-13"</code> from here .I know about <code>NSDateFormatter</code> to format date.but I can't do that here.I need to trim that</p>
  
  <p>For that I am using:-</p>
  
  <pre><code> NSCharacterSet *charc=[NSCharacterSet characterSetWithCharactersInString:@"-13"];
  
   [str1 stringByTrimmingCharactersInSet:charc];  
  </code></pre>
  
  <p>But this does not work.this does not trim...how to do that..help</p>