Return true if x is in the interval (offset, offset + length).
true
x
(offset, offset + length)
bool containsExclusive(int x) => offset < x && x < offset + length;