tryDropSuffix(_:)

    Attempts to drop a given suffix from the collection.

    func tryDropSuffix<C>(_ other: C) -> Self.SubSequence? where C : Collection, Self.Element == C.Element

    Parameters

    other

    The collection that contains the suffix.

    Returns

    The resulting subsequence, or nil if the prefix doesn’t match.

    Other members in extension

    Instance members