String to Array


#1

Is there a way to separate a string into an array of characters? Or does Kotlin have an equivalent to .charAt()?


#2

Yes. String.toCharArray().
And yes: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html

"Hello World".get(2)
// OR
"Hello World"[2]

#3

Thanks for the help.