isWhitespace

説明

引数の文字が空白文字であるかどうかを解析します。引数が空白文字または水平タブ(’\t’)であればtrueを返します。

構文

isWhitespace(thisChar)

thisChar:変数。許可されたデータ型:char

戻り値

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

プログラム例

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 (条件付き演算子)

タイトルとURLをコピーしました