indexWhere
trait Collection[A] {
def indexWhere(p: (A) => Boolean): Int
def indexWhere(p: (A) => Boolean: j: Int): Int
}
indexWhere
returns the index of the first element that satisfy the predicate p
.
The search can start at the given offset j
.
If no element satisfy p
then this function returns -1
.