Concatenation
public struct Concatenation<First: Collection, Second: Collection>: Collection
where First.Element == Second.Element
extension Concatenation: BidirectionalCollection
where First: BidirectionalCollection, Second: BidirectionalCollection
extension Concatenation: RandomAccessCollection
where First: RandomAccessCollection, Second: RandomAccessCollection
extension Concatenation: MutableCollection
where First: MutableCollection, Second: MutableCollection
A collection that is all the elements of one collection followed by all the elements of a second collection.
-
The elements in
self.Declaration
Swift
public typealias Element = First.Element -
The collection whose elements appear first.
Declaration
Swift
public var first: First -
The collection whose elements appear second.
Declaration
Swift
public var second: Second -
Declaration
Swift
public init(_ first: First, _ second: Second) -
A position in a
See moreConcatenation.Declaration
Swift
public struct Index : Comparable -
The collection’s “past the last” position—that is, the position one greater than the last valid subscript argument.
Declaration
Swift
@inlinable public var endIndex: Index { get } -
Returns the next index after
i. -
Accesses the element at
i. -
The number of elements in
self.Declaration
Swift
@inlinable public var count: Int { get } -
True iff
selfcontains no elements.Declaration
Swift
@inlinable public var isEmpty: Bool { get } -
Returns the distance between two indices.
-
Returns the next position before
i.
-
Accesses the element at
i.
View on GitHub
Concatenation Structure Reference