nextIndex

abstract fun nextIndex(): Int(source)

Returns the char-based position of the next Unicode code point in the iteration that would be returned by a subsequent call to next, or the end index if the iteration has reached the end.

Since Kotlin

2.5