diff options
author | David Robillard <d@drobilla.net> | 2025-03-24 21:21:25 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2025-03-24 21:22:40 -0400 |
commit | c701c58a43d7f5446b5594b73664a7f6d9812e27 (patch) | |
tree | 24e6072d3b7414d96f74ea753bea3a4f684811ba | |
parent | 38e2af1455bc526a8cbf8f056809dbc8455a9f0b (diff) | |
download | serd-c701c58a43d7f5446b5594b73664a7f6d9812e27.tar.gz serd-c701c58a43d7f5446b5594b73664a7f6d9812e27.tar.bz2 serd-c701c58a43d7f5446b5594b73664a7f6d9812e27.zip |
-rw-r--r-- | src/string_utils.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/string_utils.h b/src/string_utils.h index 6a098991..f4b27bcc 100644 --- a/src/string_utils.h +++ b/src/string_utils.h @@ -51,13 +51,13 @@ is_xdigit(const int c) static inline bool is_space(const char c) { - return c == ' ' || (c >= '\t' && c <= '\r'); + return c == ' ' || in_range(c, '\t', '\r'); } static inline bool is_print(const int c) { - return c >= 0x20 && c <= 0x7E; + return in_range(c, 0x20, 0x7E); } static inline bool @@ -88,7 +88,7 @@ hex_digit_value(const uint8_t c) static inline char serd_to_upper(const char c) { - return (char)((c >= 'a' && c <= 'z') ? c - 32 : c); + return (char)(in_range(c, 'a', 'z') ? (c - 32) : c); } SERD_PURE_FUNC static inline int |