GuardsisDigitsisDigits CallableisDigits(xs: string): booleanChecks if xs contains only digits. ExampleisDigits("1234")// => trueisDigits("1234foobar")// => falseisDigits("123.45")// => falseParametersxs: stringThe value to check.Returns booleantrue if xs only contains digits, false otherwise.
Checks if
xs
contains only digits.Example