Skip to content

isLowerCase

gicking edited this page Feb 10, 2018 · 3 revisions

back to Command Reference / Characters

Description

Analyse if a char is lower case (that is a letter in lower case). Returns true if thisChar contains a letter in lower case.

Inclusion

  • defined in misc.h
  • auto-loaded in main_general.h
  • no #define required

Syntax

isLowerCase(thisChar)

Parameters

  • input:

    • thisChar: character to test (char)
  • output:

    • none

Returns

  • true: if thisChar is lower case.
  • false: otherwise

Example Code

The below code reads a char from the terminal and checks for isLowerCase().

#include "main_general.h"
#include "uart1.h"
#include "putchar.h"

void setup() {

  // init UART, printf() and gets()
  UART1_begin(115200);
  putcharAttach(UART1_write);

} // setup

void loop() {

  if (UART1_available())
    if (isLowerCase(UART1_read()))
      printf("isLowerCase(x) = true\n");
    else
      printf("isLowerCase(x) = false\n");

}

Relevant Tutorial

  • tbd

See also

Clone this wiki locally