Checking number in String

How to know if the string is number of not?
example:
str = “1234”
This string is numeric.

Depends on what you recognize as a number (integers, floats, various representations of the latter), but variations

is_number(str) = tryparse(Float64, str) ≠ nothing

could be a good start.

1 Like