Module ddash.range.slicing
Returns a slice of a range
Example
auto arr = [1, 2, 3, 4, 5];
assert(arr.slice(1).equal([2, 3, 4, 5]));
assert(arr.slice(0, 0).empty);
assert(arr.slice(1, 3).equal([2, 3]));
assert(arr.slice(0, -2).equal([1, 2, 3]));
assert(arr.initial.equal([1, 2, 3, 4]));
assert(arr.tail.equal([2, 3, 4, 5]));
Functions
Name | Description |
slice(range, start)
|
Returns a slice of range from start up to, but not including, end
|
Aliases
Name | Type | Description |
initial
|
|
Gets all but the last element of a range
|
tail
|
|
Gets all but the first element of a range
|