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 the first element in items that is greater than or equal to context, as determined by compareFn. If no such element exists, returns 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 index
Returns the index of the first element in
itemsthat is greater than or equal tocontext, as determined bycompareFn. If no such element exists, returnsitems.len.itemsmust be sorted in ascending order with respect tocompareFn:O(log n)time complexity.See also:
binarySearch,upperBound,partitionPoint,equalRange.