Answers for "swift 4.21 input from user and convert into number"

8

convert string to int swift

let myString1 = "10"
let myInt1 = Int(myString1) ?? 0
// you need to provide the optional in case the string can't be converted
Posted by: Guest on June-25-2020

Code answers related to "swift 4.21 input from user and convert into number"

Code answers related to "Swift"

Browse Popular Code Answers by Language