kotlin.collections.indexOfFirst

indexOfFirst

inline fun <T> Iterable<T>.indexOfFirst(
    predicate: (T) -> Boolean
): Int

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

inline fun <T> List<T>.indexOfFirst(
    predicate: (T) -