Instance Methodswift 6.0.1Swift
formIndex(_:offsetBy:)
func formIndex(_ i: inout AnyRandomAccessCollection<Element>.Index, offsetBy n: Int)
Other members in extension
Typealiases
Type members
init(AnyRandomAccessCollection<Element>
) Creates an
AnyRandomAccessCollection
having the same underlying collection asother
.init?(AnyBidirectionalCollection<Element>
) Creates an
AnyRandomAccessCollection
having the same underlying collection asother
.init?(AnyCollection<Element>
) Creates an
AnyRandomAccessCollection
having the same underlying collection asother
.init<C>(C
) Creates a type-erased collection that wraps the given collection.
Instance members
var count: Int
The number of elements.
var endIndex: AnyRandomAccessCollection<Element>.Index
The collection’s “past the end” position—that is, the position one greater than the last valid subscript argument.
var startIndex: AnyRandomAccessCollection<Element>.Index
The position of the first element in a non-empty collection.
var underestimatedCount: Int
subscript(Range<AnyRandomAccessCollection<Element>.Index>
) -> AnyRandomAccessCollection<Element>.SubSequence subscript(AnyRandomAccessCollection<Element>.Index
) -> Element Accesses the element indicated by
position
.func distance(from: AnyRandomAccessCollection<Element>.Index, to: AnyRandomAccessCollection<Element>.Index
) -> Int func drop(while: (Element) throws -> Bool
) rethrows -> AnyRandomAccessCollection<Element> func dropFirst(Int
) -> AnyRandomAccessCollection<Element> func dropLast(Int
) -> AnyRandomAccessCollection<Element> func filter((Element) throws -> Bool
) rethrows -> [Element] func forEach((Element) throws -> Void
) rethrows func formIndex(inout AnyRandomAccessCollection<Element>.Index, offsetBy: Int, limitedBy: AnyRandomAccessCollection<Element>.Index
) -> Bool func formIndex(after: inout AnyRandomAccessCollection<Element>.Index
) func formIndex(before: inout AnyRandomAccessCollection<Element>.Index
) func index(AnyRandomAccessCollection<Element>.Index, offsetBy: Int
) -> AnyRandomAccessCollection<Element>.Index func index(AnyRandomAccessCollection<Element>.Index, offsetBy: Int, limitedBy: AnyRandomAccessCollection<Element>.Index
) -> AnyRandomAccessCollection<Element>.Index? func index(after: AnyRandomAccessCollection<Element>.Index
) -> AnyRandomAccessCollection<Element>.Index func index(before: AnyRandomAccessCollection<Element>.Index
) -> AnyRandomAccessCollection<Element>.Index func makeIterator(
) -> AnyRandomAccessCollection<Element>.Iterator Returns an iterator over the elements of this collection.
func map<T, E>((Element)
throws func prefix(Int
) -> AnyRandomAccessCollection<Element> func prefix(while: (Element) throws -> Bool
) rethrows -> AnyRandomAccessCollection<Element> func suffix(Int
) -> AnyRandomAccessCollection<Element>