kotlin.text.foldIndexed

foldIndexed

inline fun <R> CharSequence.foldIndexed(
    initial: R, 
    operation: (index: Int, acc: R, Char) -> R
): R

Accumulates value starting with initial value and applying operation from