private int parseSingleLocalizedDigit ( String text , int start , int [ ] len ) { int digit = - 1 ; len [ 0 ] = 0 ; if ( start < text . length ( ) ) { int cp = Character . codePointAt ( text , start ) ; // First, try digits configured for this instance for ( int i = 0 ; i < _gmtOffsetDigits . length ; i ++ ) { if ( cp == _gmtOffsetDigits [ i ] . codePointAt ( 0 ) ) { digit = i ; break ; } } // If failed, check if this is a Unicode digit if ( digit < 0 ) { digit = UCharacter . digit ( cp ) ; } if ( digit >= 0 ) { len [ 0 ] = Character . charCount ( cp ) ; } } return digit ; }
Reads a single decimal digit either localized digits used by this object or any Unicode numeric character .