code: public static String stripNonLongChars(final String value) {
          final StringBuilder newString = new StringBuilder();
  
          for (int i = 0; i < value.length(); i++) {
              final char c = value.charAt(i);
              if (c == '.') {
                  // stop if we hit a decimal point
                  break;
              } else if (c >= '0' && c <= '9' || c == '-') {
                  newString.append(c);
              }
          }
          // check to make sure we do not have a single length string with
          // just a minus sign
          final int sLen = newString.length();
          final String s = newString.toString();
          if (sLen == 0 || sLen == 1 && "-".equals(s)) {
              return "0";
          }
  
          return newString.toString();
      }
docs: Removes chars from the String that could not
  be parsed into a Long value
  
  PZStringUtils.stripNonLongChars("1000.25") = "1000"
  
  Method will truncate everything to the right of the decimal
  place when encountered.
  
  @param value
  @return String