isHexadecimalDigit()

名称

isHexadecimalDigit()

説明

文字が16進数値(A-F、0-9)であるかを調べる。

書式

inline boolean isHexadecimalDigit(int c);

引数

c調べたい文字。

戻り値

cが16進数値の場合はtrue、そうでない場合はfalse。

使用例

1
2
3
4
5
6
if (isHexadecimalDigit(myChar)) { // tests if myChar is an hexadecimal digit
  Serial.println("The character is an hexadecimal digit");
}
else {
  Serial.println("The character is not an hexadecimal digit");
}

参照

言語 char

言語 if

言語 while

言語 Serial.read()

訳者註

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

オリジナルのページ

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

Last Revision: 2019/02/21

実装の解析

まだ解析していません。

最終更新日

January 4, 2024

inserted by FC2 system