kotlin-stdlib / kotlin.text / onEach onEach Common JVM JS Native 1.1 inline fun <S : CharSequence> S.onEach( action: (Char) -> Unit): S(source) Performs the given action on each character and returns the char sequence itself afterwards.