
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
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().
Syntax
The syntax is −
isGraph(myChar)
Where myChar is the character being checked. A quick question. Will the tab and new line characters return true with isGraph().
Example
Validate your answer with a simple code like below −
void setup() { // put your setup code here, to run once: Serial.begin(9600); Serial.println(); 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: }
Advertisements