public String substring(int end) {
        return string().substring(position(),end);
    }
Returns a substring of this from the current position to the end argument
vespajlib/src/main/java/com/yahoo/text/PositionedString.java