v1.8.22
  • Solutions
    • Multiplatform
    • Server-side
    • Data science
    • Android
  • Docs
  • Community
  • Teach
  • Play
    • Playground
    • Hands-on
    • Examples
    • Koans
← Docs
kotlin-stdlib / kotlin.text / flatMapIndexedTo

flatMapIndexedTo

Common
JVM
JS
Native
1.4
@JvmName("flatMapIndexedIterableTo") inline fun <R, C : MutableCollection<in R>> CharSequence.flatMapIndexedTo(
    destination: C,
    transform: (index: Int, Char) -> Iterable<R>
): C

(source)

Appends all elements yielded from results of transform function being invoked on each character and its index in the original char sequence, to the given destination.

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