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.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/regex/byte_range.rs b/src/regex/byte_range.rs
index d549a55..66c58ad 100644
--- a/src/regex/byte_range.rs
+++ b/src/regex/byte_range.rs
@@ -36,6 +36,14 @@ impl ByteRange {
self.from.max(other.from) <= self.to.min(other.to)
}
+ pub fn lower_bound(&self) -> u8 {
+ self.from
+ }
+
+ pub fn upper_bound(&self) -> u8 {
+ self.to
+ }
+
pub fn split_to_disjoint(ranges: Vec<ByteRange>) -> Vec<ByteRange> {
if ranges.is_empty() {
return vec![];