aboutsummaryrefslogtreecommitdiff
path: root/src/stdlib/bytes.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/stdlib/bytes.h')
-rw-r--r--src/stdlib/bytes.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/stdlib/bytes.h b/src/stdlib/bytes.h
index f875e7cb..2794d1d9 100644
--- a/src/stdlib/bytes.h
+++ b/src/stdlib/bytes.h
@@ -22,6 +22,9 @@ Byte_t Byte$from_int16(int16_t i, bool truncate);
Closure_t Byte$to(Byte_t first, Byte_t last, OptionalInt8_t step);
MACROLIKE Byte_t Byte$from_int8(int8_t i) { return (Byte_t)i; }
MACROLIKE Byte_t Byte$from_bool(bool b) { return (Byte_t)b; }
+MACROLIKE CONSTFUNC bool Byte$is_between(const Byte_t x, const Byte_t low, const Byte_t high) {
+ return low <= x && x <= high;
+}
extern const Byte_t Byte$min;
extern const Byte_t Byte$max;