← Docs
kotlin-stdlib / kotlin.text / withIndex

withIndex

Common
JVM
JS
Native
1.0
fun CharSequence . withIndex ( ) : Iterable < IndexedValue < Char > >
(source)

Returns a lazy Iterable that wraps each character of the original char sequence into an IndexedValue containing the index of that character and the character itself.

Stay in touch:
  • Contributing to Kotlin
  • Releases
  • Press Kit
  • Security
  • Blog
  • Issue Tracker
  • Brand assets
  • Careers
Supported and developed by JetBrains .
Kotlin™ is protected under the Kotlin Foundation
and licensed under the Apache 2 license .