Function alcibiades::bitsets::bsf_reset
[−]
[src]
pub fn bsf_reset(x: &mut Bitboard) -> Square
Returns the binary position of the LSB (bit-scan-forward), and resets the LSB to zero.
If *x
is 0
this function returns 64
.
Examples:
let mut x = 0b100100; assert_eq!(bsf_reset(&mut x), 2); assert_eq!(x, 0b100000); assert_eq!(bsf_reset(&mut x), 5); assert_eq!(x, 0); assert_eq!(bsf_reset(&mut x), 64); assert_eq!(x, 0);