onEach
Performs the given action on each character and returns the char sequence itself afterwards.
inline fun <S : CharSequence> S.onEach(action: (Char) -> Unit): S(source)
val text = "Kotlin"
val result = text.onEach { println("Char: $it") }
println("Returned string: $result")