Android String to Int Convert isNumberString(String input)

Here you can find the source of isNumberString(String input)

Description

is Number String

Declaration

public static boolean isNumberString(String input) 

Method Source Code

//package com.java2s;

public class Main {

    public static boolean isNumberString(String input) {
        if (!isNullOrEmpty(input)) {
            if (input.matches("[0-9]+")) {
                return true;
            }/* w  ww  . ja  v  a  2s . c o  m*/
        }

        return false;
    }

    public static boolean isNullOrEmpty(String input) {
        if (null == input || "".equals(input)) {
            return true;
        }
        return false;
    }
}

Related

  1. isNum(String s)
  2. isNumber(String str)
  3. isNumber(String str)
  4. isNumber(String str)
  5. isNumber(final String s)
  6. isNumberic(String str)
  7. toInt(Object obj)
  8. toInt(String obj)
  9. toInt(String str, int defValue)