indexOf

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

Platform and version requirements: JVM

Returns first 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.