private long toLong(CharBuffer cb, int start) {
        long result = 0;
        int sign = 1;

        // if number is signed we should consume sign and save it
        char first = cb.get(start);
        if (first == '-' || first == '+') {
            cb.get();
            sign = first == '-' ? -1 : 1;
        }

        while (cb.hasRemaining()) {
            result *= 10;
            result += cb.get() - '0';
        }

        return result * sign;
    }
Gets the original string being parsed.

@return The original string.
exts/jphp-zend-ext/src/main/java/org/develnext/jphp/zend/ext/standard/date/DateTimeTokenizer.java