intLinearSearch

fun intLinearSearch(slot: IntegerSlotsEnum, startIndex: Int, endIndex: 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. Only search the given range of indices. If the given Int value is found within the given range, answer the index of the intSlot. Otherwise answer zero (0).

Return

The one-based index of the key Int, if found, otherwise 0.

Parameters

slot

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

startIndex

The first intSlot index to examine. It must be in range for this repeated slot.

endIndex

The last intSlot index to examine. It must be in range for this repeated slot.

key

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