public static long atol(String s){
  int i=0;
  while (i < s.length() && Character.isWhitespace(s.charAt(i)))   i++;
  if (i < s.length() && s.charAt(i) == '0') {
    if (i + 1 < s.length() && (s.charAt(i + 1) == 'x' || s.charAt(i + 1) == 'X'))     return parseLong(s.substring(i + 2),16);
 else     return parseLong(s,8);
  }
 else   return parseLong(s,10);
}

public static long atol ( String s ) { int i = 0 ; while ( i < s . length ( ) && Character . isWhitespace ( s . charAt ( i ) ) ) i ++ ; if ( i < s . length ( ) && s . charAt ( i ) == '0' ) { if ( i + 1 < s . length ( ) && ( s . charAt ( i + 1 ) == 'x' || s . charAt ( i + 1 ) == 'X' ) ) return parseLong ( s . substring ( i + 2 ) , 16 ) ; else return parseLong ( s , 8 ) ; } else return parseLong ( s , 10 ) ; }
converts a string of digits ( decimal , octal or hex ) to a long integer
