CharSequence (int start, int end) { int cesure = head.length(); if (end <= cesure) { return head.subSequence(start, end); } if (start >= cesure) { return tail.subSequence(start - cesure, end - cesure); } if (start == 0 && end == count) { return this; } // Overlaps head and tail. if (end - start < BLOCK_SIZE) { char[] data = new char[end - start]; ImmutableText.getChars(head, start, cesure, data, 0); ImmutableText.getChars(tail, 0, end - cesure, data, cesure - start); return new String(data); } return concatNodes(head.subSequence(start, cesure), tail.subSequence(0, end - cesure)); }