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


Arduino isUpperCase()用法及代碼示例

[人物]

說明

分析 char 是否為大寫(即大寫字母)。如果 thisChar 為大寫,則返回 true。

用法

isUpperCase(thisChar)

參數

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

返回

true : 如果 thisChar 是大寫的。

示例代碼

if (isUpperCase(myChar)) {  // tests if myChar is an upper case letter
  Serial.println("The character is upper case");
}
else {
  Serial.println("The character is not upper case");
}

相關用法


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