boolean b = s.matches("[0-9]+");
String d = "0123456789";
int i, n = s.length();
boolean b = n != 0;
for (i = 0; i < n; ++i)
if (d.indexOf(s.charAt(i)) == -1) {
b = false;
break;
}
boolean b = s.matches("\\d+");
char a[] = s.toCharArray(), c;
int i, n = a.length;
boolean b = n != 0;
for (i = 0; i < n; ++i)
if ((c = a[i]) < '0' || c > '9') {
b = false;
break;
}
boolean b = s.matches("[0-9]*");
B := (for all Char of S => Char in '0' .. '9');
bool b = true;
const int n = strlen(s);
for (int i = 0; i < n; ++i) {
if (!isdigit(s[i])) {
b = false;
break;
}
}
char b = 0;
int n = strlen(s);
for (int i = 0; i < n; i++) {
if (! (b = (s[i] >= '0' && s[i] <= '9')))
break;
}
(def b (every? #(Character/isDigit %) s))
bool b = false;
if (! s.empty() && std::all_of(s.begin(), s.end(), [](char c){return std::isdigit(c);})) {
b = true;
}
bool b = s.All(char.IsDigit);
bool b = s.filter!(a => !isDigit(a)).empty;
final b = RegExp(r'^[0-9]+$').hasMatch(s);
b = Regex.match?(~r{\A\d*\z}, s)
{_,Rest} = string:to_integer(S),
B = Rest == "".
Str = "21334",
[Ch || Ch <- Str, Ch < $0 orelse Ch > $9] == [].
b = .true.
do i=1, len(s)
if (s(i:i) < '0' .or. s(i:i) > '9') then
b = .false.
exit
end if
end do
isNotDigit := func(c rune) bool { return c < '0' || c > '9' }
b := strings.ContainsFunc(s, isNotDigit)
b := true
for _, c := range s {
if c < '0' || c > '9' {
b = false
break
}
}
var b = /^[0-9]+$/.test(s);
val regex = Regex("[0-9]*")
val b = regex.matches(s)
fun String?.isOnlyDigits() = !this.isNullOrEmpty() && this.all { Character.isDigit(it) }
(setf b (every #'digit-char-p s))
id nodigit=[[NSCharacterSet characterSetWithRange:NSMakeRange('0',10)].invertedSet copy];
BOOL b=![s rangeOfCharacterFromSet:nodigit].length;
$b = preg_match('/\D/', $s) !== 1;
var
S: String;
C: Char;
B: Boolean;
for C in S do
begin
B := C in ['0'..'9'];
if not B then Break;
end;
b = s.count("^0-9").zero?
let b = s.bytes().all(|c| c.is_ascii_digit());
let b = s.chars().all(char::is_numeric);
let chars_are_numeric: Vec<bool> = s.chars()
.map(|c|c.is_numeric())
.collect();
let b = !chars_are_numeric.contains(&false);
def onlyDigits(s: String) = s.forall(_.isDigit)
b := s allSatisfy: #isDigit
Dim x As String = "123456"
Dim b As Boolean = IsNumeric(x)