iterator

Iterator for characters of the given char sequence.

operator fun CharSequence.iterator(): CharIterator(source)
val text = "Kotlin"

for (ch in text) {
    println(ch)
}

Source