/src/main/java/org/htmlunit/html/impl/SimpleRange.java
if ( startOffset_ > -1) {
if ( isOffsetChars ( startContainer_ ) ) {
deleteContents(ancestor); } } private void deleteContents(final DomNode ancestor) { final DomNode start; final DomNode end; <extra_id_0> start = startContainer_; String text = getText(start); if (startOffset_ > -1 && startOffset_ < text.length()) { text = text.substring(0, startOffset_); } setText(start, text);