binarySearch

fun binarySearch(fromIndex: Long, toIndex: Long, key: Long): Long

Return the index of a key if it exists, or its insertion point otherwise like Arrays.binarySearch.

See also

Arrays.binarySearch