# std.bit_set: add setRangeValue\(Range, bool\) · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/2a415a033cce07b579a490eca2556e7d700c04b1)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 2a415a033cce07b579a490eca2556e7d700c04b1

Requested commit: 2a415a033cce07b579a490eca2556e7d700c04b1

Commit: 2a415a033cce07b579a490eca2556e7d700c04b1

Tree: 5c51516a4bcb9a227cbcd7a1bf736085472af866

Author: Arnavion

Committer: Andrew Kelley

## Message

```
std.bit_set: add setRangeValue(Range, bool)

For large ranges, this is faster than having the caller call setValue() for
each index in the range. Masks wholly covered by the range can be set to
the new mask value in one go, and the two masks at either end that are
partially covered can each set the covered range of bits in one go.

```

## Parents

- [8a94971980001d29d7c8cdfe6ca25aa834552405](https://git.cafe/gitcafe/zig/commit/8a94971980001d29d7c8cdfe6ca25aa834552405?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/2a415a033cce07b579a490eca2556e7d700c04b1?format=markdown)
