StructureSwift

    Repeated

    A collection whose elements are all identical.

    @frozen struct Repeated<Element>

    Overview

    You create an instance of the Repeated collection by calling the repeatElement(_:count:) function. The following example creates a collection containing the name “Humperdinck” repeated five times:

    let repeatedName = repeatElement("Humperdinck", count: 5)
    for name in repeatedName {
        print(name)
    }
    // "Humperdinck"
    // "Humperdinck"
    // "Humperdinck"
    // "Humperdinck"
    // "Humperdinck"

    Members

    Typealiases

    • typealias Index

      A type that represents a valid position in the collection.

    • typealias Indices

      A type that represents the indices that are valid for subscripting the collection, in ascending order.

    Foundation

    Instance Subscripts

    Instance Properties

    Foundation

    • var regions: Repeated<Data>

      A BidirectionalCollection of DataProtocol elements which compose a discontiguous buffer of memory. Each region is a contiguous buffer of bytes.

    Instance Methods

    Foundation

    Removed Members

    Instance Methods