-
Notifications
You must be signed in to change notification settings - Fork 7
isWhitespace
gicking edited this page Feb 10, 2018
·
3 revisions
back to Command Reference / Characters
Analyse if a char is a white space, that is space, formfeed ('\f'), newline ('\n'), carriage return ('\r'), horizontal tab ('\t'), and vertical tab ('\v')). Returns true if thisChar contains a white space.
- defined in
misc.h
- auto-loaded in
main_general.h
- no
#define
required
isWhitespace(thisChar)
-
input:
- thisChar: character to test (char)
-
output:
- none
- true: if thisChar is a white space.
- false: otherwise
The below code reads a char from the terminal and checks for isWhitespace()
.
#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 (isWhitespace(UART1_read()))
printf("isWhitespace(x) = true\n");
else
printf("isWhitespace(x) = false\n");
}
- tbd
-
Getting Started
-
- General Commands
- Libraries
- LCD BTHQ21605V
- poti AD5280
- poti AD5282
- freemodbus
- PetitFS SD-card (min)
- FatFS: SD card (full)
- Board Specific
-
- Universal
- Board Specific