aboutsummaryrefslogtreecommitdiffstats
path: root/src/regex/byte_range.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/regex/byte_range.rs')
-rw-r--r--src/regex/byte_range.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/regex/byte_range.rs b/src/regex/byte_range.rs
index 5123da5..d549a55 100644
--- a/src/regex/byte_range.rs
+++ b/src/regex/byte_range.rs
@@ -24,6 +24,10 @@ impl ByteRange {
Self::new_range(c, c)
}
+ pub fn all() -> Self {
+ Self::new_range(0, 255)
+ }
+
pub fn contains(&self, c: u8) -> bool {
self.from <= c && c <= self.to
}