W3cubDocs

/Kotlin

filterKeys

inline fun <K, V> Map<out K, V>.filterKeys(
    predicate: (K) -> Boolean
): Map<K, V>

Returns a map containing all key-value pairs with keys matching the given predicate.

The returned map preserves the entry iteration order of the original map.

© 2010–2017 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/filter-keys.html