Import std.math.bits
PopCount
function
Public Function PopCount<T: Integer>(value: T): Int
How many of the value's bits are 1.
Examples
Expect(PopCount(0b1011) == 3)
Expect(LeadingZeros(1 As UInt8) == 7)
Expect(TrailingZeros(0b1000) == 3)Report an issue with this page or with FutureBlitz on GitHub.