I'm trying to split string into Array Of integers:
let stringNumbers = "1 2 10" var arrayIntegers = stringNumbers.characters.flatMap{Int(String($0))} But my problem is I'm getting this output:
[1, 2, 1, 0] When I should be getting this output:
[1, 2, 10] What I'm doing wrong?
I'll really appreciate your help.