dropRight

Drops n elements from end of range

dropRight
(
Range
)
(
Range range
,
size_t n = 1
)
if (
from!"std.range".isBidirectionalRange!Range
)

Parameters

range
Type: Range

input range

n
Type: size_t

number of elements to drop

Return Value

Type: auto

new range

Examples

import std.array;
assert([1, 2, 3].dropRight.equal([1, 2]));

Meta

Since

0.0.1