stripSuffix method

Option<Slice<T>> stripSuffix(
  1. Slice<T> suffix
)

Implementation

Option<Slice<T>> stripSuffix(Slice<T> suffix) {
  if (endsWith(suffix)) {
    return Some(Slice(_list, _start, _end - suffix._end + suffix._start));
  }
  return None;
}