Operator

...(_:_:)

Returns a closed range that contains both of its bounds.

Declaration

Parameters

minimum

The lower bound for the range.

maximum

The upper bound for the range.

Discussion

Use the closed range operator (...) to create a closed range of any type that conforms to the Comparable protocol. This example creates a ClosedRange<Character> from “a” up to, and including, “z”.

let lowercase = "a"..."z"
print(lowercase.contains("z"))
// Prints "true"

See Also

Comparing Scheduler Times

static func < (DispatchQueue.SchedulerTimeType, DispatchQueue.SchedulerTimeType) -> Bool

Returns a Boolean value indicating whether the value of the first argument is less than that of the second argument.

static func <= (DispatchQueue.SchedulerTimeType, DispatchQueue.SchedulerTimeType) -> Bool

Returns a Boolean value indicating whether the value of the first argument is less than or equal to that of the second argument.

static func == (DispatchQueue.SchedulerTimeType, DispatchQueue.SchedulerTimeType) -> Bool

Returns a Boolean value indicating whether two values are equal.

static func > (DispatchQueue.SchedulerTimeType, DispatchQueue.SchedulerTimeType) -> Bool

Returns a Boolean value indicating whether the value of the first argument is greater than that of the second argument.

static func >= (DispatchQueue.SchedulerTimeType, DispatchQueue.SchedulerTimeType) -> Bool

Returns a Boolean value indicating whether the value of the first argument is greater than or equal to that of the second argument.