question: String readNumber ( String source , int ofs , String token , boolean adjacent ) { if ( adjacent ) { return source . substring ( ofs , ofs + token . length ( ) ) ; } int len = source . length ( ) ; for ( int i = ofs ; i < len ; i ++ ) { char ch = source . charAt ( i ) ; if ( isNumeric ( ch ) == false ) { if ( i == 0 ) { return null ; } return source . substring ( ofs , i ) ; } } return source . substring ( ofs ) ; }
target:  Read the number. Does not attempt to parse.