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
let array = "0123456789".compactMap{ Int(String($0)) } print(array)