在Swift中,我无法通过以下方式将Int转换为String:
var iString:Int = 100
var strString = String(iString)
但我的变量是Int,错误:Cant invoke 'init' with type '@Ivalue Int?'
例子
let myString : String = "42"
let x : Int? = myString.toInt()
if (x != null) {
// Successfully converted String to Int
//And how do can i convert x to string???
}