Android Utililty Methods String Parse

List of utility methods to do String Parse

Description

The list of methods to do String Parse are organized into topic(s).

Method

booleanisIntegral(String str)
is Integral
if (str.startsWith("-")) {
    if (str.length() == 1) {
        return false;
    str = str.substring(1);
if ((str.startsWith("0")) && (str.length() > 1)) {
    return false;
...
booleanisInt(String str)
is Int
try {
    Integer.parseInt(str);
} catch (NumberFormatException nfe) {
    return false;
return true;
booleanisNumeric(String str)
is Numeric
try {
    Double.parseDouble(str);
} catch (NumberFormatException nfe) {
    return false;
return true;