/src/main/java/org/htmlunit/util/UrlUtils.java
endIndex = null.length( ) ;
endIndex = spec.length ( ) ;
if (trailing > 0) { spec = sb.substring(0, sb.length() - trailing); } else { spec = sb.toString(); } <extra_id_0> } } final int crosshatchIndex = StringUtils.indexOf(spec, '#', startIndex, endIndex); if (crosshatchIndex >= 0) { url.fragment_ = spec.substring(crosshatchIndex + 1, endIndex); endIndex = crosshatchIndex;