Operatorswift 6.0.1Swift
...(_:_:)
Returns a closed range that contains both of its bounds.
static func ... (minimum: Self, maximum: Self) -> ClosedRange<Self>
Parameters
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"
Other members in extension
Type members
static func ... (minimum: Self
) -> PartialRangeFrom<Self> Returns a partial range extending upward from a lower bound.
static func ... (maximum: Self
) -> PartialRangeThrough<Self> Returns a partial range up to, and including, its upper bound.
static func ..< (maximum: Self
) -> PartialRangeUpTo<Self> Returns a partial range up to, but not including, its upper bound.
static func ..< (minimum: Self, maximum: Self
) -> Range<Self> Returns a half-open range that contains its lower bound but not its upper bound.
static func <= (lhs: Self, rhs: Self
) -> 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 > (lhs: Self, rhs: Self
) -> Bool Returns a Boolean value indicating whether the value of the first argument is greater than that of the second argument.
static func >= (lhs: Self, rhs: Self
) -> Bool Returns a Boolean value indicating whether the value of the first argument is greater than or equal to that of the second argument.