← Standard library

Range

struct Range<T> where T is integral
import Range from Wax;

An integral range with a start and exclusive end, used by range iteration. Step supplies a positive stride; use ascending bounds for a nonempty range.

Range.wax:5

Members

startfield

public T start

The inclusive first value.

Range.wax:9

endfield

public T end

The exclusive upper bound.

Range.wax:13

constructorconstructor

public constructor (T start, T end)

Creates a range with the supplied start and exclusive end.

Range.wax:18

Stepmethod

public fn Step(T step) : SteppedRange<T>

Returns a stepped range with the same bounds. A zero or negative step panics.

Range.wax:26

ToStringmethod

public fn ToString() : string

Provided by the compiler.

ToStringBuffermethod

public fn ToStringBuffer(StringBuilder builder) : int32

Provided by the compiler.