There appears to be no isnumeric support, how is everyone validating a string is a number?
There is isdigit()
for single characters, or you could just attempt a conversion and check the result, or you use strspn()
.
It also depends on what you consider numeric, do you want to check for integers, floating point, pure numeric or also starting with a number irrespective of any non-numeric suffix?