RichUtils / pyxis.uzuki.live.richutilskt.utils / matchAnyPredicate

matchAnyPredicate

fun <T> matchAnyPredicate(predicate: (T) -> Boolean, vararg items: T): Boolean

Test if given any of vararg parameter are match given predicate

Usages testWithParams({ it.length > 3 }, "Steve", "Bobs") -> true testWithParams({ it.length > 3 }, "Steve", "Bob") -> true testWithParams({ it.length > 3 }, "Eve", "Bob") -> false

Parameters

predicate - : Higher-order function that given single and return as Boolean

Parameters