indexOfLastOrNull

fun <T> Collection<T>.indexOfLastOrNull(predicate: (T) -> Boolean): Int?

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


fun <T> ArrayList<T>.indexOfLastOrNull(predicate: (T) -> Boolean): Int?

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


fun <T> Iterable<T>.indexOfLastOrNull(predicate: (T) -> Boolean): Int?

Returns index of the last element matching the given predicate, or null if the iterable does not contain such element.