Answers for "conert int to decimal value swift"

1

string to decimal swift

let decimal: Decimal = 51000000000
let str = String(describing: decimal)

let savedValues = UserDefaults.standard

savedValues.set(str, forKey:"jitterClickCost")
savedValues.synchronize()

let value = savedValues.string(forKey: "jitterClickCost") ?? "0"

let result = Decimal(string: value)
Posted by: Guest on March-25-2020

Code answers related to "Swift"

Browse Popular Code Answers by Language