isWhitespace()

名称

isWhitespace()

説明

文字が空白文字であるかを調べる。引数が空白か水平タブ(’\t’)のとき、trueを返す。

書式

inline boolean isWhitespace(int c);

引数

c調べたい文字。

戻り値

cが空白の場合はtrue、そうでない場合はfalse。

使用例

1
2
3
4
5
6
if (isWhitespace(myChar)) { // tests if myChar is a space character
  Serial.println("The character is a space or tab");
}
else {
  Serial.println("The character is not a space or tab");
}

参照

言語 char

言語 if

言語 while

言語 Serial.read()

訳者註

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

オリジナルのページ

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

Last Revision: 2019/05/17

実装の解析

まだ解析していません。

最終更新日

January 4, 2024

inserted by FC2 system