long longTo(int end) {
            int start = position;
            String value = stringTo(end);
            try {
                return Long.parseLong(value.trim());
            }
            catch (NumberFormatException e) {
                throw new IllegalArgumentException("Expected an integer between positions " + start + " and " + end +
                                                   ", but got " + value);
            }
        }
Returns the long value from the current to the given position, and moves the current
position to the next character.

@throws IllegalArgumentException if the string cannot be parsed to a long or end is larger than the string
container-search/src/main/java/com/yahoo/search/yql/ParameterListParser.java