/src/main/java/org/htmlunit/html/impl/SimpleRange.java
if ( ( offset > ( -1) ) && ( offset < ( text.length( ) ) ) ) {   text = text.substring( 0, offset) ;   setText( node, text) ; }
[Delete]
} final DomNode start; final DomNode end; if (isOffsetChars(startContainer_)) { start = startContainer_; String text = getText(start); <extra_id_0> text = text.substring(0, startOffset_); } setText(start, text); } else if (startContainer_.getChildNodes().getLength() > startOffset_) { start = (DomNode) startContainer_.getChildNodes().item(startOffset_);