Range¶
Import: import system.core;
Ranges are also available without an explicit import. See Ranges for runnable examples, including descending traversal.
Range¶
An exclusive integer range that counts toward its end, ascending or descending.
start¶
The first value, included unless the range is empty.
end¶
The stopping value, always excluded.
constructor¶
Creates a range from start toward the excluded end, with unit steps.
length¶
The number of elements. Panics if the distance exceeds the maximum int (2147483647).
is_empty¶
True when the start and end are equal.
contains¶
True when value occurs before the excluded end in either direction.
iterator¶
Creates a fresh cursor that visits the range in unit steps toward its end.