code: public static int safeStrToInt(String str) {
          if (sciInt.matcher(str).find()) {
              return SafeCast.safeDoubleToInt(Double.parseDouble(str.toUpperCase()));
          } else {
              return Integer.parseInt(str);
          }
      }
docs: Correctly casts 1e+06 to 1000000.