clz

Count leading zeroes.

  1. ubyte clz(U u)
    version(DigitalMars)
    pragma(inline, true) @safe @nogc pure nothrow
    ubyte
    clz
    (
    U
    )
    (
    U u
    )
    if (
    is(U == uint) ||
    is(U == ulong)
    )
  2. alias clz = __builtin_clz
  3. ubyte clz(ulong u)
  4. ubyte clz(ulong u)
  5. ubyte clz(U u)

Parameters

u U

the unsigned value to scan

Return Value

Type: ubyte

The number of leading zero bits before the first one bit. If u is 0, the result is undefined.

Meta