isDigit()

설명

문자가 숫자 (0-9) 인지 분석합니다. thisChar가 숫자일 때 true를 반환합니다.

문법

isDigit(thisChar)

매개변수

  • thisChar: 변수. 허용되는 자료형: char

반환값

  • thisChar가 숫자이라면 true를, 아니라면 false를 반환합니다.

예제 코드

if (isDigit(myChar)) { // tests if myChar is a digit Serial.println("The character is a number"); } else { Serial.println("The character is not a number"); }

더보기

ARDUINO BUY RECOMMENDATION

Arduino UNO R3
Arduino Starter Kit
Disclosure: Some links in this section are Amazon affiliate links. If you make a purchase through these links, we may earn a commission at no extra cost to you.
Additionally, some links direct to products from our own brand, DIYables.

※ OUR MESSAGES