title: Get currency symbols from currency code with swift
body: <p>How can I get the currency symbols for the corresponding currency code with Swift (macOS). </p>
  
  <p><strong>Example:</strong></p>
  
  <ul>
  <li>EUR = €1.00</li>
  <li>USD = $1.00</li>
  <li>CAD = $1.00</li>
  <li>GBP = £1.00</li>
  </ul>
  
  <p><strong>My code:</strong></p>
  
  <pre><code>var formatter = NSNumberFormatter()
  formatter.currencySymbol = getSymbol(currencyCode)
  formatter.numberStyle = NSNumberFormatterStyle.CurrencyStyle
  let number = NSNumber(double: (amount as NSString).doubleValue)
  let amountWithSymbol = formatter.stringFromNumber(number)!
  </code></pre>
  
  <p><code>getSymbol(_ currencyCode: String) -&gt; String</code></p>
  
  <p>or.. is there a better way?</p>