Answers for "how to convert from string to float on swift"

1

how do i get a string from a float swift to 1 decimal swift

let someFloat: Float = 3.14159
let floatToString: String = String(format: "%.01f", someFloat)
// floatToString => 3.14
Posted by: Guest on September-28-2020
0

how to covert a string into a float in swift

var WageConversion = (Wage.text as NSString).floatValue
Posted by: Guest on January-04-2022

Code answers related to "how to convert from string to float on swift"

Code answers related to "Swift"

Browse Popular Code Answers by Language