@Test public void getText() { assertGetText("1\n23", "01\n23", 1, 5); assertGetText("\n2", "01\n23", 2, 4); assertGetText("1\n2", "01\n23", 1, 4); assertGetText("1\n2", "01\r\n23", 1, 5); }
public String getText(int offset, int endIndex) { return text.substring(offset, endIndex); }
Cursor { public String getText(int offset, int endIndex) { return text.substring(offset, endIndex); } }
Cursor { public String getText(int offset, int endIndex) { return text.substring(offset, endIndex); } Cursor(TextSegment segment); }
Cursor { public String getText(int offset, int endIndex) { return text.substring(offset, endIndex); } Cursor(TextSegment segment); int getOffset(); int getOffset(int cursorOffset); int toCursorOffset(int documentOffset); char getChar(); char getChar(int offset); boolean hasChar(); String getText(int offset, int endIndex); char getPrevious(); boolean hasPrevious(); boolean hasPrevious(int offset); char getPrevious(int offset); char getNext(); char getNext(int offset); String getTextAtOffset(); String getTextAtOffset(int length); boolean hasNext(); boolean hasNext(int offset); Matcher matcher(Pattern pattern); Matcher matcher(int offset, Pattern pattern); void advance(); void advance(int count); void rewind(int count); void rewind(); Line getLineAtOffset(); }
Cursor { public String getText(int offset, int endIndex) { return text.substring(offset, endIndex); } Cursor(TextSegment segment); int getOffset(); int getOffset(int cursorOffset); int toCursorOffset(int documentOffset); char getChar(); char getChar(int offset); boolean hasChar(); String getText(int offset, int endIndex); char getPrevious(); boolean hasPrevious(); boolean hasPrevious(int offset); char getPrevious(int offset); char getNext(); char getNext(int offset); String getTextAtOffset(); String getTextAtOffset(int length); boolean hasNext(); boolean hasNext(int offset); Matcher matcher(Pattern pattern); Matcher matcher(int offset, Pattern pattern); void advance(); void advance(int count); void rewind(int count); void rewind(); Line getLineAtOffset();  }