I am trying to split a string into individual characters.
The string I want to split: let lastName = "Kocsis" so that is returns something like: ["K","o","c","s","i","s"]
So far I have tried:
var name = lastName.componentsSeparatedByString("")This returns the original stringname = lastName.characters.split{$0 == ""}.map(String.init)This gives me an error: Missing argument for parameter #1 in call. So basically it does't accept "" as an argument.name = Array(lastName)This does't work in Swift2name = Array(arrayLiteral: lastName)This doesn't do anything.
How should I do this? Is There a simple solution?