isEmpty
A Boolean value indicating whether the range contains no elements.
Declaration
var isEmpty: Bool { get }Discussion
An empty Range instance has equal lower and upper bounds.
let empty: Range = 10..<10
print(empty.isEmpty)
// Prints "true"A Boolean value indicating whether the range contains no elements.
var isEmpty: Bool { get }An empty Range instance has equal lower and upper bounds.
let empty: Range = 10..<10
print(empty.isEmpty)
// Prints "true"