question: public final static boolean inLongRange ( char [ ] digitChars , int offset , int len , boolean negative ) { String cmpStr = negative ? MIN_LONG_STR_NO_SIGN : MAX_LONG_STR ; int cmpLen = cmpStr . length ( ) ; if ( len < cmpLen ) return true ; if ( len > cmpLen ) return false ; for ( int i = 0 ; i < cmpLen ; ++ i ) { if ( digitChars [ offset + i ] > cmpStr . charAt ( i ) ) { return false ; } } return true ; }
target:  Helper method for determining if given String representation of an integral number would fit in 64-bit Java long or not. Note that input String must NOT contain leading minus sign (even if 'negative' is set to true).