src/main/java/org/teachingextensions/approvals/lite/util/NumberUtils.java
public static int load(String i, int defaultValue, boolean stripNonNumeric)
  {
    try
    {
      i = stripNonNumeric ? StringUtils.stripNonNumeric(i, true, true) : i;
      defaultValue = Integer.parseInt(i);
    }
    catch (Exception ignored)
    {
    }
    return defaultValue;
  }
public static int load(String i, int defaultValue, boolean stripNonNumeric)
  {
    try
    {
      i = stripNonNumeric ? StringUtils.stripNonNumeric(i, true, true) : i;
      defaultValue = Integer.parseInt(i);
    }
    catch (Exception ignored)
    {
    }
    return defaultValue;
  }
public static int load ( String i , int defaultValue , boolean stripNonNumeric ) { try { i = stripNonNumeric ? StringUtils . stripNonNumeric ( i , true , true ) : i ; defaultValue = Integer . parseInt ( i ) ; } catch ( Exception ignored ) { } return defaultValue ; }
Loads an int from a String.

@param i               a string with an integer in it
@param defaultValue    value to use when no integer can be found in the string
@param stripNonNumeric true if non-numeric characters should be removed from the string
@return the integer found in the string
Loads an int from a String .