Package-level declarations
/docs/reference/ranges.html, Progressions and related top-level and extension functions.
Types
A range of values of type Char
.
Represents a range of floating point numbers. Extends ClosedRange interface providing custom operation lessThanOrEquals for comparing values of range domain type.
Represents a range of values (for example, numbers or characters). See the Kotlin language documentation for more information.
A range of values of type Int
.
A range of values of type Long
.
Functions
Ensures that this value is not less than the specified minimumValue.
Ensures that this value is not greater than the specified maximumValue.
Ensures that this value lies in the specified range.
Ensures that this value lies in the specified range.
Ensures that this value lies in the specified range minimumValue..maximumValue.
Returns true
if this iterable range contains the specified element.
Returns true
if this range contains the specified element.
Checks if the specified value belongs to this range.
Returns a progression from this value down to the specified to value with the step -1.
Returns a random element from this range.
Returns a random element from this range using the specified source of randomness.
Creates a range from this Comparable value to the specified that value.
Returns a progression that goes over the same range in the opposite direction with the same step.
Returns a progression that goes over the same range with the given step.
Returns a range from this value up to but excluding the specified to value.