long (CharSequence seq, int offset, int length) { int index = 0; int resultingLength = 0; while (length-- > 0) { int nextIndex = findSubNode(index, seq.charAt(offset++)); if (nextIndex == 0) { break; } index = nextIndex; resultingLength++; } return index + (((long)resultingLength) << 32); }