Operator

..<(_:_:)

Returns a half-open range that contains its lower bound but not its upper bound.

Declaration

Parameters

minimum

The lower bound for the range.

maximum

The upper bound for the range.

Discussion

Use the half-open range operator (..<) to create a range of any type that conforms to the Comparable protocol. This example creates a Range<Double> from zero up to, but not including, 5.0.

let lessThanFive = 0.0..<5.0
print(lessThanFive.contains(3.14))  // Prints "true"
print(lessThanFive.contains(5.0))   // Prints "false"

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.