I\'d like to know how can I convert a String in an Int array in Swift. In Java I\'ve always done it like this:
String myString = \"123456789\"; int[] myArray = n
Swift 3 update:
@appzYourLife : That's correct toInt() method is no longer available for String in Swift 3. As an alternative what you can do is :
toInt()
intArray.append(Int(String(chr)) ?? 0)
Enclosing it within Int() converts it to Int.
Int()