title: Method converts strings in Objective-C
body: <p>I'm new to objective-c and I need help with this.</p>
  
  <p>A phone number in this country has 10 digits like 6195946191 or 619JYDN191. It is hard to read a phone number formatted like that. One common format is 619-594-6191. Add the method phoneFormat to the NSString class. The method phoneFormat converts strings like</p>
  
  <pre><code>@"6195946191", @"619 594 6191", @"619 5946191" and @"619-594-6191" to @"619-594-6191".
  </code></pre>
  
  <p>That is all the methods below will return @"619-594-6191"</p>
  
  <pre><code>[@"6195946191" phoneFormat]
  [@"619 594 6191" phoneFormat]
  [@"619 5946191" phoneFormat]
  [@"619-594-6191" phoneFormat]
  </code></pre>
  
  <p>Can anyone show me how to do this?</p>