init(string:locale:)
Creates and initializes a decimal by parsing a string according to the provided locale’s conventions.
Declaration
init?(string: String, locale: Locale? = nil)Parameters
- string:
A string containing a formatted decimal value.
- locale:
A locale that indicates the formatting conventions used by
string.