Answers for "how to check in a string only numbers"

C++
0

check have string have just numbers

String numbers = "6969696969";
boolean check_n = numbers.matches("[0-9]+"); // true

String notNumber = "0123meowGOGO88l";
boolean check_s = notNumber.matches("[0-9]+"); // false
Posted by: Guest on February-22-2022

Code answers related to "how to check in a string only numbers"

Browse Popular Code Answers by Language