Android String to Number Convert isNumber(String str)

Here you can find the source of isNumber(String str)

Description

is Number

Declaration

public static Boolean isNumber(String str) 

Method Source Code

//package com.java2s;

public class Main {

    public static Boolean isNumber(String str) {
        Boolean isNumber = false;
        String expr = "^[0-9]+$";
        if (str.matches(expr)) {
            isNumber = true;/*w  w  w.j  a  va2 s  . c o  m*/
        }
        return isNumber;
    }
}

Related

  1. isNumeric(String string)
  2. isLetterNumeric(String s)
  3. isNumericOnly(String pString)
  4. isNumeric(String str)
  5. containsNonNumericCharacters(String rawInput)
  6. isNumberLetter(String str)
  7. isStringNumber(String number)
  8. isStringNumberLessThan(String number, int compareInt)