isControl()

名称

isControl()

説明

文字が制御文字であるかを調べる。

書式

inline boolean isControl(int c);

引数

c調べたい文字。

戻り値

cが制御文字の場合はtrue、そうでない場合は false。

使用例

1
2
3
4
5
6
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");
}

参照

言語 char

言語 if

言語 while

言語 Serial.read()

訳者註

内部ではiscntrl()を呼び出しています。

オリジナルのページ

https://www.arduino.cc/reference/en/language/functions/characters/iscontrol/

Last Revision: 2019/02/21

実装の解析

まだ解析していません。

最終更新日

January 4, 2024

inserted by FC2 system