How to Convert a String to Double and Float types using Swift 4
/In Swift 4 you get native String support for working with different numeric types (Float, Double, and Int). But that's not the end of the story, you may need to use the NumberFormatter (NSNumberFormatter) class to convert formatted numbers (1,000,000) or currency ($3.50) in your Swift code.
Read More