RangeReplaceableCollection
extension RangeReplaceableCollection
-
Creates a collection containing the elements of a cursor.
// [String] let cursor = try String.fetchCursor(db, ...) let strings = try Array(cursor)Declaration
Swift
public init(_ cursor: some Cursor<Element>) throwsParameters
cursorThe cursor whose elements feed the collection.
-
Creates a collection containing the elements of a cursor.
// [String] let cursor = try String.fetchCursor(db, ...) let strings = try Array(cursor, minimumCapacity: 100)Declaration
Swift
public init(_ cursor: some Cursor<Element>, minimumCapacity: Int) throwsParameters
cursorThe cursor whose elements feed the collection.
minimumCapacityPrepares the returned collection to store the specified number of elements.
-
Adds the elements of a cursor to the end of this collection.
In case of error, an unspecified amount of elements have been added to the collection.
Declaration
Swift
public mutating func append(contentsOf newElements: some Cursor<Element>) throwsParameters
newElementsThe elements to append to the collection.
View on GitHub
Install in Dash
RangeReplaceableCollection Extension Reference