Android String to Int Convert isTextInteger(String texto)

Here you can find the source of isTextInteger(String texto)

Description

is Text Integer

License

Open Source License

Declaration

public static boolean isTextInteger(String texto) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static boolean isTextInteger(String texto) {
        boolean out = false;
        if (texto != null) {
            texto = texto.toLowerCase().trim();
            try {
                Integer.parseInt(texto);
                return true;
            } catch (Exception e) {
                return false;
            }/*from   ww  w .j  a  va  2  s. c o  m*/
        }
        return out;
    }
}

Related

  1. toInteger(String value)
  2. toNumber(String str)
  3. amount2String(String amount)
  4. String2Int(String str)
  5. string2Int(String str)
  6. getInt(String str, int defaultValue)
  7. getIntFromStr(String str)
  8. getIntValue(String str)
  9. getFirstInteger(String value)