Answers for "how can you check if strings contain only digits"

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 can you check if strings contain only digits"

Browse Popular Code Answers by Language