Analyze if a char is printable with some content (space is printable but has no content). Returns true if the input char is printable.
Use the following function to evaluate a char variable:
isGraph(thisChar)
The function admits the following parameter:
thisChar: char variable to evaluate. Allowed data types: char.
The function returns true if the evaluated input variable is is printable.
char myChar = ' '; // try with 'A' for a printable char
void setup() {
Serial.begin(9600);
if (isGraph(myChar)) { // tests if myChar is a printable character but not a blank space.
Serial.println("The character is printable");
}
else {
Serial.println("The character is not printable");
}
}
void loop() {
}