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