lastOrNull

inline fun lastOrNull(): T?

Returns the last element in the MutableVector or null if it isEmpty.

inline fun lastOrNull(predicate: (T) -> Boolean): T?

Returns the last element in the MutableVector for which predicate returns true or returns null if nothing matches.