List of utility methods to do String Parse
boolean | isASCII(String str) Returns true if the string does not fit in standard ASCII if (str == null) return true; for (int i = 0; i < str.length(); ++i) { char c = str.charAt(i); if (c < 0 || c > 0x7f) return false; return true; ... |
boolean | isAllDigital(String str) is All Digital boolean is = true; if (getCharNum(str, '.') >= 2) { return false; for (int i = 0; i < str.length(); ++i) { if ((str.charAt(i) - '0' < 0 || str.charAt(i) - '9' > 0) && str.charAt(i) - '.' != 0) { is = false; ... |
boolean | isDecimal(String str) is Decimal return Pattern.compile("[\\d]").matcher(str).matches(); |
boolean | isDifferent(String str1, String str2) is Different return !equals(str1, str2);
|
boolean | isDigits(Object o) is Digits if (o == null) { return false; String s = o.toString(); if (s.length() == 0) return false; int i = (s.charAt(0) == '-') ? 1 : 0; for (int j = s.length(); i < j; i++) { ... |
boolean | isDigits(String s) is Digits if (s == null || s.length() == 0) return false; int begin = (s.charAt(0) == '-') ? 1 : 0; for (int i = begin; i < s.length(); i++) { if (!Character.isDigit(s.charAt(i))) return false; return true; ... |
boolean | isDouble(String str) is Double Pattern pattern = Pattern.compile("^[-\\+]?[.\\d]*$"); return pattern.matcher(str).matches(); |
boolean | isIDCard(String str) is ID Card int length = str.length(); return isNumber(str) && (length == 15 || length == 18); |
boolean | isInteger(String input) is Integer try { Integer.parseInt(input); return true; } catch (Exception e) { return false; |
boolean | isInteger(String str) is Integer Pattern pattern = Pattern.compile("^[-\\+]?[\\d]*$"); return pattern.matcher(str).matches(); |