I've got a little problem. I want to split a String in an array of characters, where I can work on each character.
For example:
"Hello"
arrayofstring[0] ->H
arrayofstring[1] ->e
arrayofstring[2] ->l
arrayofstring[3] ->l
arrayofstring[4] ->o
I am thankful for every help.
Unless I'm missing something, it's easier than either of the other answers:
let arrayofstring = Array("Hello".characters)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With