binarySearch

Finds a value in a sorted range and returns its index.

ptrdiff_t
binarySearch
(
alias sort = "a<b"
T
)
(
T[] arr
,)

Return Value

Type: ptrdiff_t

a bitwise invert of the first element bigger than value. Use ~ret to turn it back.

Meta