Question : how do i get a string from a float swift to 1 decimal swift
Answered by : antonio-bmzlyvbwufdo
let someFloat: Float = 3.14159
let floatToString: String = String(format: "%.01f", someFloat)
// floatToString => 3.14
Source : | Last Update : Mon, 05 Oct 20
Question : how to covert a string into a float in swift
Answered by : eager-eland-z5cogst0n0qf
var WageConversion = (Wage.text as NSString).floatValue
Source : https://stackoverflow.com/questions/24085665/convert-string-to-float-in-swift | Last Update : Tue, 11 Jan 22