Function slice

Returns a slice of range from start up to, but not including, end

auto auto slice(Range) (
  Range range,
  size_t start,
  int end
);

auto auto slice(Range) (
  Range range,
  size_t start
);

If end is not provided the whole rest of the range is implied. And if end is a negative number then it's translated to range.length - abs(end).`

Parameters

NameDescription
range the input range to slice
start at which index to start the slice
end which index to end the slice

Returns

A range

Since

0.0.1