text: public char[] get(int posStart, int length) {assert length > 0;assert inBounds(posStart): "posStart=" + posStart + " length=" + length;final int startIndex = getIndex(posStart);final int endIndex = getIndex(posStart + length);final char[] result = new char[length];if (endIndex >= startIndex && length < buffer.length) {System.arraycopy(buffer, startIndex, result, 0, endIndex-startIndex);} else {final int part1 = buffer.length-startIndex;System.arraycopy(buffer, startIndex, result, 0, part1);System.arraycopy(buffer, 0, result, buffer.length-startIndex, length-part1);}return result;}