Function alcibiades::bitsets::bsf [] [src]

pub fn bsf(x: Bitboard) -> Square

Returns the binary position of the LSB (bit-scan-forward).

If x is 0 this function returns 64.

Examples:

assert_eq!(bsf(0b100100), 2);
assert_eq!(bsf(0), 64);