mirror of
https://github.com/apple/swift-collections
synced 2026-11-22 04:20:40 +00:00
1.7 KiB
1.7 KiB
BitCollections/BitArray
Topics
Creating a Bit Array
init()init(minimumCapacity:)init(_:)-2y0wvinit(repeating:count:)-4j5ydinit(_:)-6ldywinit(_:)-4tksdinit(_:)-765d2init(bitPattern:)randomBits(count:)randomBits(count:using:)
Accessing Elements
subscript(_:)-51ccj
firstlast
Adding Elements
append(_:)-8dqhnappend(contentsOf:)-18dwfappend(contentsOf:)-576q4append(contentsOf:)-8xkr8append(repeating:count:)insert(_:at:)-9t4hfinsert(contentsOf:at:)-7e1xninsert(contentsOf:at:)-35dp3insert(contentsOf:at:)-1wsgwinsert(repeating:count:at:)truncateOrExtend(toCount:with:)
Removing Elements
remove(at:)-7ij12removeAll(keepingCapacity:)-5tkgeremoveAll(where:)-7tv7zremoveSubrange(_:)-86ou8removeSubrange(_:)-18qe7removeLast()removeLast(_:)removeFirst()-dcspremoveFirst(_:)-9nqlopopLast()
Replacing Elements
fill(in:with:)-1lrlgfill(in:with:)-8sf1bfill(with:)replaceSubrange(_:with:)-163u2replaceSubrange(_:with:)-875d8replaceSubrange(_:with:)-2i7lureplaceSubrange(_:with:)-b5ou
Bitwise Operations
toggleAll()toggleAll(in:)-3duwntoggleAll(in:)-5hfhlmaskingShiftLeft(by:)maskingShiftRight(by:)resizingShiftLeft(by:)resizingShiftRight(by:)