Applies offset to the right slice, and then combines two slices together if they have equal length.
(
left: &'left [Left],
right: &'right [Right],
right_offset: usize,
)
| 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( |
| 63 | left: &'left [Left], |
| 64 | right: &'right [Right], |
| 65 | right_offset: usize, |
| 66 | ) -> Option<Self> { |
| 67 | let right_with_offset = right.get(right_offset..)?; |
| 68 | |
| 69 | Self::build_if_equal(left, right_with_offset) |
| 70 | } |
| 71 | |
| 72 | /// Applies offsets to the both slices, and then combines them together if they have equal length. |
| 73 | pub fn new_with_left_and_right_offset( |