title: How to create an array of unicode values of currency symbols in Swift?
body: <pre><code>Unicode values are:
  U+20A0 to U+20AF
  </code></pre>
  
  <p>All these values represent currency symbol. Check the following link for reference: <a href="https://en.wikipedia.org/wiki/Currency_Symbols_(Unicode_block)" rel="nofollow">https://en.wikipedia.org/wiki/Currency_Symbols_(Unicode_block)</a></p>
  
  <p>In swift, I can print the currency symbol associated with a unicode with the following code:</p>
  
  <pre><code>let rupee = "\u{20B9}"    //Its currency symbol "₹"
  </code></pre>
  
  <p>My goel is to show all currency symbols in a table and for this purpose, I want to create an array of unicode values whose range I have mentioned above. I have used the following code to create an array, but there is problem in the step in which I am creating the unicode :</p>
  
  <pre><code>var unicodeArray:[String] = [String]()
  for var decNumber=0; decNumber &lt; 16; decNumber++ {
      let hexVal = String(decNumber, radix: 16)
      let unicode = "{20A\(hexVal)}"  \\u is missing in the string, writing \u gives error"
      unicodeArray.append(unicode)
  }
  </code></pre>
  
  <p>After the for loop, array would have values between {20A0} to {20AF}, But I need the values from "\u{20A0}" to "\u{20AF}". How can I fix this. Or Is there any other way of doing what I am trying?</p>