[BitArray] Add docs.

This commit is contained in:
Karoy Lorentey committed 2022-08-25 23:50:35 -07:00
1 parent fcac09d86a
commit 5bc22eaf9b
9 files changed
+348 -12

No files matched your search

@@ -10,6 +10,12 @@
//===----------------------------------------------------------------------===//
extension BitArray {
/// Set the count of this bit array to `count`, by either truncating it or
/// extending it by appending the specified Boolean value (`false` by default).
///
/// - Parameter count: The desired count of the bit array on return.
/// - Parameter padding: The value to append the array if the array is
/// currently too short.
public mutating func truncateOrExtend(
toCount count: Int,
with padding: Bool = false