Package
Conforms to
Initializers
Methods
Value Type โฉ
Range, an immutable sequence of numbers. Read more in the language reference.
Initializers
๐
๐ ๐ start ๐ข stop ๐ข
Creates a range from start to stop.
๐
๐ ๐ start ๐ข stop ๐ข step ๐ข
Creates a range from start to stop with the provided step.
Methods
๐ฝโ๏ธ
โ๏ธ ๐ฝ n ๐ข โก๏ธ ๐ข
Returns the n*th element of the range. *n is only valid if start + step * n
is >= start
and < stop
. If n is invalid, the program will panic.
๐โ
โ ๐ โก๏ธ ๐ข
Returns the number of integers in this range.
๐กโ๏ธ
โ๏ธ ๐ก โก๏ธ ๐ณ๐๐ข๐
Returns an iterator to iterate over integers in this range.