bsf

fnint bsf(uint v) nothrow @safe @nogc pure

Scans the bits in v starting with bit 0, looking for the first set bit.

Returns

The bit number of the first bit set.

The return value is undefined if v is zero.

fnint bsf(ulong v) nothrow @safe @nogc pure

ditto