diff options
| author | 2026-08-25 12:48:43 -0400 | |
|---|---|---|
| committer | 2026-08-25 12:48:43 -0400 | |
| commit | f6d6c613bf6d770a148e30afa4b94fd163e96d6a (patch) | |
| tree | 2afb3a30d05b9b05f92f87925ce397f9f18c4fb3 /include/al | |
| parent | 57801f54ec4f52d85f493e1f8032805de5f0daef (diff) | |
| download | libalabaster-f6d6c613bf6d770a148e30afa4b94fd163e96d6a.tar.gz libalabaster-f6d6c613bf6d770a148e30afa4b94fd163e96d6a.tar.bz2 libalabaster-f6d6c613bf6d770a148e30afa4b94fd163e96d6a.zip | |
lib: Add isnumber()
Signed-off-by: Andrew Opalach <andrew@akon.city>
Diffstat (limited to 'include/al')
| -rw-r--r-- | include/al/lib.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/al/lib.h b/include/al/lib.h index 8e16700..6e21510 100644 --- a/include/al/lib.h +++ b/include/al/lib.h @@ -207,6 +207,11 @@ static inline bool al_isspace(char c) return (c == ' ' || c == '\f' || c == '\n' || c == '\r' || c == '\t' || c == '\v'); } +static inline bool al_isnumber(char c) +{ + return c >= '0' && c <= '9'; +} + // ASCII-only. static inline bool al_isupper(char c) { |