mapIndexedTo

abstract fun <R, C : MutableCollectionWrapper<in R>> mapIndexedTo(destination: C, transform: (index: Int, Char) -> R): C

将给定转换函数应用于原始 CharSequenceWrapper 的每个元素的结果,并提供元素的索引,并将结果添加到目标 MutableCollectionWrapper 中。

参考 kotlin.sequences.mapIndexedTo

Return

目标 MutableCollectionWrapper。

Parameters

destination

目标 MutableCollectionWrapper。

transform

用于将每个元素转换为结果元素的函数。