Collection
public extension Collection
-
Safely retrieves an element in the collection. Otherwise returns nil.
Declaration
Swift
subscript(safe offset: Int) -> Iterator.Element? { get }
Parameters
offset
The offset of the element compared to the
startIndex
. -
The opposite of
isEmpty
.Declaration
Swift
var isNotEmpty: Bool { get }