toCharArray

Returns a CharArray containing characters of this string.

expect fun String.toCharArray(): CharArray(source)
fun main() {
    val text = "Hello, Kotlin!"
    val charArray = text.toCharArray()
    println(charArray.joinToString(", "))
}

Source