Function safe_arch::population_extract_u32
source · pub fn population_extract_u32(a: u32, index: u32) -> u32
Expand description
Extract bits from a u32
according to a mask.
assert_eq!(population_extract_u32(0b1001, 0b1111), 0b1001);
assert_eq!(population_extract_u32(0b1001, 0b1110), 0b0100);
assert_eq!(population_extract_u32(0b1001, 0b1100), 0b0010);