filterIndexedTo

abstract fun <C : MutableCollectionWrapper<in PT>> filterIndexedTo(destination: C, predicate: (index: Int, PT) -> Boolean): C

将满足给定谓词的元素添加到目标集合中,并提供元素索引.

参考 kotlin.collections.filterIndexedTo

Return

目标集合

Parameters

destination

目标集合

predicate

谓词函数,用于测试每个元素及其索引