Is string a valid number check?
Posted: Mon Aug 06, 2012 10:11 pm
Hello,
What is the fastest way to check if a string is a valid number or not?
Or other way round to check it is a valid string only starting with a num char?
I have for example a string "1KR60". (float ) and (int ) makes a numer from it.
Would it be to check the string contain any ALPHA-chars?
A regex?
Regards
Hans-Peter
What is the fastest way to check if a string is a valid number or not?
Or other way round to check it is a valid string only starting with a num char?
I have for example a string "1KR60". (float ) and (int ) makes a numer from it.
Would it be to check the string contain any ALPHA-chars?
A regex?
Regards
Hans-Peter