Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

check if the given string is a number

//Add this to your code and call
static private boolean isMyNumber(String s){
        try{
            Integer.parseInt(s);
            return true;
        }catch (Exception e){
            return false;
        }
    }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #check #string #number
ADD COMMENT
Topic
Name
2+3 =