Applies offset to the left slice, and then combines two slices together if they have equal length.
(
left: &'left [Left],
left_offset: usize,
right: &'right [Right],
)
| 49 | |
| 50 | /// Applies offset to the left slice, and then combines two slices together if they have equal length. |
| 51 | pub fn new_with_left_offset( |
| 52 | left: &'left [Left], |
| 53 | left_offset: usize, |
| 54 | right: &'right [Right], |
| 55 | ) -> Option<Self> { |
| 56 | let left_with_offset = left.get(left_offset..)?; |
| 57 | |
| 58 | Self::build_if_equal(left_with_offset, right) |
| 59 | } |
| 60 | |
| 61 | /// Applies offset to the right slice, and then combines two slices together if they have equal length. |
| 62 | pub fn new_with_right_offset( |