Checking number in String

question
#1

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

0 Likes

#2

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