filter

inline fun <T> Array<out T>.filter(
    predicate: (T) -> Boolean
): List<T>
(source)
inline fun ByteArray.filter(
    predicate: (Byte) -> Boolean
): List<Byte>
(source)
inline fun ShortArray.filter(
    predicate: (Short) -> Boolean
): List<Short>
(source)
inline fun IntArray.filter(
    predicate: (Int) -> Boolean
): List<Int>
(source)
inline fun LongArray.filter(
    predicate: (Long) -> Boolean
): List<Long>
(source)
inline fun FloatArray.filter(
    predicate: (Float) -> Boolean
): List<Float>
(source)
inline fun DoubleArray.filter(
    predicate: (Double) -> Boolean
): List<Double>
(source)
inline fun BooleanArray.filter(
    predicate: (Boolean) -> Boolean
): List<Boolean>
(source)
inline fun CharArray.filter(
    predicate: (Char) -> Boolean
): List<Char>
(source)
inline fun <T> Iterable<T>.filter(
    predicate: (T) -> Boolean
): List<T>
(source)

Returns a list containing only elements matching the given predicate.

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

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

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