Feature request: String::isInt() and String::isFloat() for more robust String parsing/conversion
The current implementations of String::toInt() and String::toFloat() rely on atol() and atof(), respectively (See WString.cpp). As both atol() and atof() have no means of signaling a failed conversion due to improper input Strings (both return 0 upon error) I propose adding two new member functions to the String Class:
int String::isInt() Returns a value different from zero if String is a valid representation of an integer. Returns zero otherwise.
int String::isFloat() Returns a value different from zero if String is a valid representation of a floating point number. Returns zero otherwise.
When using the current implementation a String "0.0" or "0" - which undoubtadly are valid representations of float and int - would be reportet as isFloat() == false / isInt() == false.