Description
Analyse if a char is a digit (that is a number). Returns true if thisChar is a number.
Syntax
isDigit(thisChar)
Parameters
thisChar
: variable. Allowed data types: char
.
Returns
true
: if thisChar is a number.
Analyse if a char is a digit (that is a number). Returns true if thisChar is a number.
isDigit(thisChar)
thisChar
: variable. Allowed data types: char
.
true
: if thisChar is a number.
if (isDigit(myChar)) { // tests if myChar is a digit
Serial.println("The character is a number");
}
else {
Serial.println("The character is not a number");
}
LANGUAGE char
LANGUAGE if (conditional operators)
LANGUAGE while (conditional operators)
LANGUAGE read()