mapOffsetEnd static method
Remaps a range end across the same edit as mapOffsetStart.
Implementation
static int mapOffsetEnd(int x, int prefix, int removedEnd, int delta) {
if (x < prefix) return x;
if (x >= removedEnd) return x + delta;
return prefix;
}