//创建一个String类型对象
var testString = "11.12"
//string转Float
let testFloat = Float(testString)
//String转Int
let testInt = Int(testFloat!)
//Int转String
testString = String(format: "%d",testInt!)
//Float转String
testString = String(format: "%f",testFloat!)
//创建一个String类型对象
var testString = "11.12"
//string转Float
let testFloat = Float(testString)
//String转Int
let testInt = Int(testFloat!)
//Int转String
testString = String(format: "%d",testInt!)
//Float转String
testString = String(format: "%f",testFloat!)