replaceSubrange(_:with:)

    Replaces the specified subrange of elements with the given CircularBuffer.

    CircularBuffer.swift:665
    mutating func replaceSubrange<C>(_ subrange: Range<Index>, with newElements: C) where Element == C.Element, C : Collection

    Parameters

    subrange

    The subrange of the collection to replace. The bounds of the range must be valid indices of the CircularBuffer.

    newElements

    The new elements to add to the CircularBuffer.

    O(n) where n is the length of the new elements collection if the subrange equals to n

    O(m) where m is the combined length of the collection and newElements

    Other members in extension

    Types

    Typealiases

    Type members

    Instance members

    Show implementation details (4)

    Hide implementation details