indexOfLast

Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0)
inline fun <T> Array<out T>.indexOfLast(
    predicate: (T) -> Boolean
): Int
inline fun ByteArray.indexOfLast(
    predicate: (Byte) -> Boolean
): Int
inline fun ShortArray.indexOfLast(
    predicate: (Short) -> Boolean
): Int
inline fun IntArray.indexOfLast(
    predicate: (Int) -> Boolean
): Int
inline fun LongArray.indexOfLast(
    predicate: (Long) -> Boolean
): Int
inline fun FloatArray.indexOfLast(
    predicate: (Float) -> Boolean
): Int
inline fun DoubleArray.indexOfLast(
    predicate: (Double) -> Boolean
): Int
inline fun BooleanArray.indexOfLast(
    predicate: (Boolean) -> Boolean
): Int
inline fun CharArray.indexOfLast(
    predicate: (Char) -> Boolean
): Int
@ExperimentalUnsignedTypes inline fun UIntArray.indexOfLast(
    predicate: (UInt) -> Boolean
): Int
@ExperimentalUnsignedTypes inline fun ULongArray.indexOfLast(
    predicate: (ULong) -> Boolean
): Int
@ExperimentalUnsignedTypes inline fun UByteArray.indexOfLast(
    predicate: (UByte) -> Boolean
): Int
@ExperimentalUnsignedTypes inline fun UShortArray.indexOfLast(
    predicate: (UShort) -> Boolean
): Int

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

Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0)
inline fun <T> Iterable<T>.indexOfLast(
    predicate: (T) -> Boolean
): Int

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

Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0)
inline fun <T> List<T>.indexOfLast(
    predicate: (T) -> Boolean
): Int

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

© 2010–2020 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/index-of-last.html