lastIndexOf

suspend fun <E> ReceiveChannel<E>.lastIndexOf(
    element: E
): Int
(source)

Platform and version requirements: JVM

Returns last index of element, or -1 if the channel does not contain element.

The operation is terminal. This function consumes all elements of the original ReceiveChannel.