The OpenD Programming Language

UInt.ctlz

struct UInt(size_t size)
const scope @property @safe pure nothrow @nogc
size_t
ctlz
()
if (
size % (size_t.sizeof * 8) == 0 &&
size >= size_t.sizeof * 8
)

Examples

auto a = UInt!128.fromHexString("dfbbfae3cd0aff2714a1de7022b0029d");
assert (a.ctlz == 0);
a = UInt!128.init;
assert (a.ctlz == 128);
a = UInt!128.fromHexString("3");
assert (a.ctlz == 126);

Meta