How to Use isGraph() in Arduino?

The isGraph() function is very similar to the isPrintable() function in Arduino. The only difference is that isGraph() returns true only if the character being printed has some content.So, blank space gets excluded by isGraph() but included by isPrintable(). All normal characters, numbers, special characters, which have some content will return true when passed through isGraph().


The syntax is −


Where myChar is the character being checked. A quick question. Will the tab and new line characters return true with isGraph().


Validate your answer with a simple code like below −

void setup() {
   // put your setup code here, to run once:
   char myChar = '
';    if (isGraph(myChar)) {       Serial.println("myChar is printable with content");    } else {       Serial.println("myChar is NOT printable with content");    } } void loop() {    // put your main code here, to run repeatedly: }