intBinarySearch

fun intBinarySearch(    slot: IntegerSlotsEnum,     slotCount: Int,     key: Int): Int

Search for the key in the 32-bit Ints encoded within the longSlots that occur within those slots identified with the specified IntegerSlotsEnum. The int slots must be in ascending sorted order, and must be distinct. If the exact int is found, answer its zero-based index within this repeated slot (i.e., ≥0). If the exact int is not found, answer (-n-1), where n is the zero-based position of the leftmost element of the repeated slot which is greater than the key (if it was equal, the "if found" case would have applied).

Return

The zero-based index of the key within the variable-length repeated slot if found, or else (-n-1) where n is the zero-based index of the leftmost int that is greater than the key.

Parameters

slot

The final integer slot, which must be the variable-length part of the longSlots array.

slotCount

The number of valid int-sized slots (starting at the specified slot's ordinal).

key

The Int value to seek in the designated region of the longSlots array.