Function bitwise::word::flip_bits_geq [] [src]

pub fn flip_bits_geq<T: Word, U: UnsignedWord>(x: T, bit: U) -> T

Flips all bits of x at position >= bit.

Panics

If bit >= bit_size().

Examples

use bitwise::word::*;

let n = 0b1001_0010u8;
let s = 0b0111_0010u8;
assert_eq!(n.flip_bits_geq(5u8), s);
assert_eq!(flip_bits_geq(n, 5u8), s);