indexOfFirst

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

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

Since Kotlin

1.0

inline fun <T> Iterable<T>.indexOfFirst(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.

Since Kotlin

1.0

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

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

Since Kotlin

1.0

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

Since Kotlin

1.3