private static int indexOfNonDigit(String string,int offset){
  for (int i=offset; i < string.length(); i++) {
    char c=string.charAt(i);
    if (c < '0' || c > '9')     return i;
  }
  return string.length();
}

private static int indexOfNonDigit ( String string , int offset ) { for ( int i = offset ; i < string . length ( ) ; i ++ ) { char c = string . charAt ( i ) ; if ( c < '0' || c > '9' ) return i ; } return string . length ( ) ; }
returns the index of the first character in the string that is not a digit , starting at offset .
