Description

Analyze if a char is lower case (that is a letter in lower case). Returns true if the input char contains a letter in lower case.

Syntax

Use the following function to evaluate a char variable:

isLowerCase(thisChar)

Parameters

The function admits the following parameter:

thisChar: char variable to evaluate. Allowed data types: char.

Returns

The function returns true if the evaluated input variable is lower case.

Example Code

char myChar = 'a';  // try with 'A' for a non lower case

void setup() {
  Serial.begin(9600);

  if (isLowerCase(myChar)) {  // tests if myChar is a lower case letter
    Serial.println("The character is lower case");
  } else {
    Serial.println("The character is not lower case");
  }
}

void loop() {
}

See also