mirror of
https://github.com/apple/swift-collections
synced 2026-11-24 04:27:53 +00:00
1.4 KiB
1.4 KiB
BitCollections/BitArray
Summary
Overview
TextTopics
Creating a Bit Array
init()init(_:)-2y0wvinit(repeating:count:)-4j5ydinit(_:)-6ldywinit(_:)-4tksdinit(_:)-765d2init(bitPattern:)random(count:)random(count:using:)
Accessing Elements
subscript(_:)-51ccjsubscript(_:)-944vgfirstlast
Adding Elements
append(_:)append(contentsOf:)-18dwfappend(contentsOf:)-576q4append(contentsOf:)-8xkr8insert(_:at:)insert(contentsOf:at:)-7e1xninsert(contentsOf:at:)-35dp3insert(contentsOf:at:)-1wsgwtruncateOrExtend(toCount:with:)
Removing Elements
remove(at:)-7ij12removeAll(keepingCapacity:)-5tkgeremoveAll(where:)-7tv7zremoveSubrange(_:)-86ou8removeSubrange(_:)-18qe7removeLast()removeLast(_:)removeFirst()removeFirst(_:)popLast()
Replacing Elements
fill(in:with:)fill(with:)replaceSubrange(_:with:)-163u2replaceSubrange(_:with:)-875d8replaceSubrange(_:with:)-2i7lureplaceSubrange(_:with:)-b5ou
Bitwise Operators
&(_:_:)_(_:_:)-1rhw_(_:_:)-56s54~(_:)&=(_:_:)_=(_:_:)-69yf0_=(_:_:)-icef