当前位置: 首页>>代码示例 >>用法及示例精选 >>正文


Arduino isGraph()用法及代码示例


[人物]

说明

分析一个字符是否可以打印一些内容(空格是可打印的但没有内容)。如果 thisChar 可打印,则返回 true。

用法

isGraph(thisChar)

参数

thisChar:变量。允许的数据类型:char

返回

true :如果 thisChar 是可打印的。

示例代码

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");
}

相关用法


注:本文由纯净天空筛选整理自arduino.cc大神的英文原创作品 isGraph()。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。