FastLED 3.9.15
Loading...
Searching...
No Matches
cctype.h
Go to the documentation of this file.
1#pragma once
2#include "fl/stl/noexcept.h"
3
5// FastLED Character Classification Functions (cctype.h equivalents)
6//
7// Provides character classification utilities similar to C <ctype.h>
8// but adapted for embedded platforms and FastLED's needs.
9//
10// All functions are in the fl:: namespace.
12
13namespace fl {
14
18inline bool isspace(char c) FL_NOEXCEPT {
19 return c == ' ' || c == '\t' || c == '\n' || c == '\r';
20}
21
25inline bool isdigit(char c) FL_NOEXCEPT {
26 return c >= '0' && c <= '9';
27}
28
32inline char tolower(char c) FL_NOEXCEPT {
33 return (c >= 'A' && c <= 'Z') ? (c + ('a' - 'A')) : c;
34}
35
39inline char toupper(char c) FL_NOEXCEPT {
40 return (c >= 'a' && c <= 'z') ? (c - ('a' - 'A')) : c;
41}
42
43} // namespace fl
char tolower(char c) FL_NOEXCEPT
Convert character to lowercase.
Definition cctype.h:32
bool isdigit(char c) FL_NOEXCEPT
Check if character is a decimal digit (0-9)
Definition cctype.h:25
char toupper(char c) FL_NOEXCEPT
Convert character to uppercase.
Definition cctype.h:39
bool isspace(char c) FL_NOEXCEPT
Check if character is whitespace (space, tab, newline, carriage return)
Definition cctype.h:18
Base definition for an LED controller.
Definition crgb.hpp:179
#define FL_NOEXCEPT