This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig standard library. Public Type Function
Returns a tuple of the lower and upper indices in items between which all elements return .eq when given to compareFn. If no element in items returns .eq, both indices are the index of the first element in items which returns .gt, or if no element returns .gt, both indices are items.len.
items must be sorted in ascending order with respect to compareFn:
[0] [len]
┌───┬───┬─/ /─┬───┬───┬───┬─/ /─┬───┬───┬───┬─/ /─┬───┐
│.lt│.lt│ \ \ │.lt│.eq│.eq│ \ \ │.eq│.gt│.gt│ \ \ │.gt│
└───┴───┴─/ /─┴───┴───┴───┴─/ /─┴───┴───┴───┴─/ /─┴───┘
├─────────────────┼─────────────────┼─────────────────┤
↳ zero or more ↳ zero or more ↳ zero or more
├─────────────────┤
↳ returned range
O(log n) time complexity.
See also: binarySearch, lowerBound,upperBound,partitionPoint.
Returns a tuple of the lower and upper indices in
itemsbetween which all elements return.eqwhen given tocompareFn. If no element initemsreturns.eq, both indices are the index of the first element initemswhich returns.gt, or if no element returns.gt, both indices areitems.len.itemsmust be sorted in ascending order with respect tocompareFn:O(log n)time complexity.See also:
binarySearch,lowerBound,upperBound,partitionPoint.