FastLED 3.10.8
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_NO_EXCEPT {
19 return c == ' ' || c == '\t' || c == '\n' || c == '\r';
20}
21
25inline bool isdigit(char c) FL_NO_EXCEPT {
26 return c >= '0' && c <= '9';
27}
28
32inline char tolower(char c) FL_NO_EXCEPT {
33 return (c >= 'A' && c <= 'Z') ? (c + ('a' - 'A')) : c;
34}
35
39inline char toupper(char c) FL_NO_EXCEPT {
40 return (c >= 'a' && c <= 'z') ? (c - ('a' - 'A')) : c;
41}
42
43} // namespace fl
char toupper(char c) FL_NO_EXCEPT
Convert character to uppercase.
Definition cctype.h:39
u8 u8 fract8 blur_amount FL_NO_EXCEPT
Definition blur.h:186
bool isspace(char c) FL_NO_EXCEPT
Check if character is whitespace (space, tab, newline, carriage return)
Definition cctype.h:18
char tolower(char c) FL_NO_EXCEPT
Convert character to lowercase.
Definition cctype.h:32
bool isdigit(char c) FL_NO_EXCEPT
Check if character is a decimal digit (0-9)
Definition cctype.h:25
Base definition for an LED controller.
Definition crgb.hpp:179