當前位置: 首頁>>編程示例 >>用法及示例精選 >>正文


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()。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。