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


Arduino isControl()用法及代碼示例

[人物]

說明

分析 char 是否為控製字符。如果 thisChar 是控製字符,則返回 true。

用法

isControl(thisChar)

參數

thisChar:變量。允許的數據類型:char

返回

true :如果 thisChar 是控製字符。

示例代碼

if (isControl(myChar)) {  // tests if myChar is a control character
  Serial.println("The character is a control character");
}
else {
  Serial.println("The character is not a control character");
}

相關用法


注:本文由純淨天空篩選整理自arduino.cc大神的英文原創作品 isControl()。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。