Collection

public extension Collection
public extension Collection where Element: Publisher
  • Returns the element at the specified index if it is within bounds, otherwise nil.

    Declaration

    Swift

    subscript(safe index: Index) -> Element? { get }

Available where Element: Publisher