nextSetBit

fun nextSetBit(startIndex: Int = 0): Int(source)

Returns an index of a next bit which value is true after startIndex (inclusive). Returns -1 if there is no such bits after startIndex.

Since Kotlin

1.3

Throws

IndexOutOfBoundException

if startIndex< 0.