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 Function
Returns the index of an element in items returning .eq when given to compareFn.
If there are multiple such elements, returns the index of any one of them.
If there are no such elements, returns null.
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
├─────────────────┤
↳ if not null, returned
index is in this range
O(log n) time complexity.
See also: lowerBound,upperBound,partitionPoint,equalRange.
Returns the index of an element in
itemsreturning.eqwhen given tocompareFn.null.itemsmust be sorted in ascending order with respect tocompareFn:O(log n)time complexity.See also:
lowerBound,upperBound,partitionPoint,equalRange.