kmongo / kotlin.collections / com.mongodb.client.MongoIterable / indexOfFirst

indexOfFirst

inline fun <T> MongoIterable<T>.indexOfFirst(crossinline predicate: (T) -> Boolean): Int (source)

Returns index of the first element matching the given predicate, or -1 if the collection does not contain such element.