- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
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().
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: }
- Related Articles
- How to Use isControl() in Arduino?
- How to use F() macro in Arduino?
- How to Use Static Variables in Arduino?
- How to Use Volatile Variables in Arduino?
- How to Use Word() Function in Arduino?
- How to use the Autocomplete feature in Arduino IDE 2.0?
- IntlChar isgraph() function in PHP
- How to use PROGMEM in Arduino to store large immutable data?
- How to Use Light Dependent Resistor (LDR) with Arduino?
- isgraph() C library function
- How to Use a Serial Monitor with Arduino IDE 2.0?
- How to Use 'U' and 'L' formatters in Arduino?
- How to Trim a String in Arduino?
- How to change programmer in Arduino IDE
- How to define a class in Arduino?

Advertisements