mirror of
https://github.com/apple/swift-collections
synced 2026-11-23 04:24:23 +00:00
1.2 KiB
1.2 KiB
DequeModule/Deque
Topics
Creating a Deque
init()init(_:)-8tyawinit(_:)-1tqf4init(minimumCapacity:)init(repeating:count:)-4v1gtinit(unsafeUninitializedCapacity:initializingWith:)
Inspecting a Deque
count-8wcnmisEmpty
Manipulating Elements at the Front
firstprepend(_:)prepend(contentsOf:)-96y15prepend(contentsOf:)-51zn6removeFirst()-1vdmtremoveFirst(_:)-2vujipopFirst()prefix(_:)
Manipulating Elements at the End
lastappend(_:)-9h4m7append(contentsOf:)-8rqnlappend(contentsOf:)-29aohremoveLast()removeLast(_:)popLast()suffix(_:)
Manipulating Elements Elsewhere
subscript(_:)-9nk44subscript(_:)-6ee8isubscript(_:)-1klkysubscript(_:)-ejldinsert(_:at:)-9hsp7insert(contentsOf:at:)-1d60freplaceSubrange(_:with:)-5rtzdremove(at:)-3imgi
Reordering Elements
swapAt(_:_:)-7910ssort()sort(by:)reverse()shuffle()shuffle(using:)partition(by:)-90y0t
Memory Management
reserveCapacity(_:)