ClosedRange
class ClosedRange
A closed interval from a lower bound up to, and including, an upper bound.
-
Number of elements contained within the range.
Declaration
var count: Double { get }
-
true
if the range contains no elements.Declaration
var isEmpty: Bool { get }
-
The object’s description
Declaration
var description: String { get }
-
Compares two values for equality.
The
equals
function is invoked using infix notation as in the following code snippet:lhs == rhs
.Declaration
func equals(_ lhs: ClosedRange) -> Bool
Parameters
lhsA value.
rhsAnother value.
Return Value
true
if thelhs
andrhs
are equal,false
otherwise.