formIndex(before:)
func formIndex(before i: inout AnyBidirectionalCollection<Element>.Index)
func formIndex(before i: inout AnyBidirectionalCollection<Element>.Index)
ss26AnyBidirectionalCollectionV9formIndex6beforeys0aE0Vz_tF
What are these?ZGN1
import Swift
@frozen struct AnyBidirectionalCollection<Element>
A type-erased wrapper over any collection with indices that support bidirectional traversal.
typealias Index = AnyIndex
init(_ other: AnyBidirectionalCollection<Element>)
Creates an AnyBidirectionalCollection
having the same underlying collection as other
.
init?(_ other: AnyCollection<Element>)
Creates an AnyBidirectionalCollection
having the same underlying collection as other
.
init<C>(_ base: C) where Element == C.Element, C : BidirectionalCollection
Creates a type-erased collection that wraps the given collection.
init<C>(_ base: C) where Element == C.Element, C : RandomAccessCollection
Creates a type-erased collection that wraps the given collection.
init(_ other: AnyRandomAccessCollection<Element>)
Creates an AnyBidirectionalCollection
having the same underlying collection as other
.
var count: Int { get }
The number of elements.
var endIndex: AnyBidirectionalCollection<Element>.Index { get }
The collection’s “past the end” position—that is, the position one greater than the last valid subscript argument.
var startIndex: AnyBidirectionalCollection<Element>.Index { get }
The position of the first element in a non-empty collection.
var underestimatedCount: Int { get }
subscript(bounds: Range<AnyBidirectionalCollection<Element>.Index>) -> AnyBidirectionalCollection<Element>.SubSequence { get }
subscript(position: AnyBidirectionalCollection<Element>.Index) -> Element { get }
Accesses the element indicated by position
.
func distance(from start: AnyBidirectionalCollection<Element>.Index, to end: AnyBidirectionalCollection<Element>.Index) -> Int
func drop(while predicate: (Element) throws -> Bool) rethrows -> AnyBidirectionalCollection<Element>
func dropFirst(_ n: Int = 1) -> AnyBidirectionalCollection<Element>
func dropLast(_ n: Int = 1) -> AnyBidirectionalCollection<Element>
func filter(_ isIncluded: (Element) throws -> Bool) rethrows -> [Element]
func forEach(_ body: (Element) throws -> Void) rethrows
func formIndex(_ i: inout AnyBidirectionalCollection<Element>.Index, offsetBy n: Int)
func formIndex(_ i: inout AnyBidirectionalCollection<Element>.Index, offsetBy n: Int, limitedBy limit: AnyBidirectionalCollection<Element>.Index) -> Bool
func formIndex(after i: inout AnyBidirectionalCollection<Element>.Index)
func index(_ i: AnyBidirectionalCollection<Element>.Index, offsetBy n: Int) -> AnyBidirectionalCollection<Element>.Index
func index(_ i: AnyBidirectionalCollection<Element>.Index, offsetBy n: Int, limitedBy limit: AnyBidirectionalCollection<Element>.Index) -> AnyBidirectionalCollection<Element>.Index?
func index(after i: AnyBidirectionalCollection<Element>.Index) -> AnyBidirectionalCollection<Element>.Index
func index(before i: AnyBidirectionalCollection<Element>.Index) -> AnyBidirectionalCollection<Element>.Index
func makeIterator() -> AnyBidirectionalCollection<Element>.Iterator
Returns an iterator over the elements of this collection.
func map<T, E>(_ transform: (Element) throws(E) -> T) throws(E) -> [T] where E : Error
func prefix(_ maxLength: Int = 1) -> AnyBidirectionalCollection<Element>
func prefix(while predicate: (Element) throws -> Bool) rethrows -> AnyBidirectionalCollection<Element>
func suffix(_ maxLength: Int) -> AnyBidirectionalCollection<Element>
typealias Indices = DefaultIndices<AnyBidirectionalCollection<Element>>
typealias Iterator = AnyIterator<Element>
typealias SubSequence = AnyBidirectionalCollection<Element>