title: How can I remove parts of an NSURL and save the result to a NSString with format?
body: <p>How can I format <code>file:///Applications/App%20Store.app</code> to be stored as a string "App Store"? I want to remove everything before "App%20Store.app" and make it automatically add a space for the %20 in the new stored string. </p>
  
  <p>My code takes user input from an <code>NSOpenPanel()</code> and saves the result shown above to an NSURL variable. </p>
  
  <p><strong>EDIT</strong> Got it working with this! Thanks</p>
  
  <pre><code>var URLinString : String = selectedApp!.absoluteString!
  
  let newString = URLinString.stringByReplacingOccurrencesOfString("file:///Applications/", withString: "")
  
  let newerString = newString.stringByReplacingOccurrencesOfString("%20", withString: " ")
  </code></pre>