@ExperimentalUnsignedTypes fun UInt.countTrailingZeroBits(): Int

Counts the number of consecutive least significant bits that are zero in the binary representation of this UInt number.

@ExperimentalUnsignedTypes fun ULong.countTrailingZeroBits(): Int

Counts the number of consecutive least significant bits that are zero in the binary representation of this ULong number.

@ExperimentalUnsignedTypes fun UByte.countTrailingZeroBits(): Int

Counts the number of consecutive least significant bits that are zero in the binary representation of this UByte number.

@ExperimentalUnsignedTypes fun UShort.countTrailingZeroBits(): Int

Counts the number of consecutive least significant bits that are zero in the binary representation of this UShort number.

fun Int.countTrailingZeroBits(): Int

Counts the number of consecutive least significant bits that are zero in the binary representation of this Int number.

fun Long.countTrailingZeroBits(): Int

Counts the number of consecutive least significant bits that are zero in the binary representation of this Long number.

fun Byte.countTrailingZeroBits(): Int

Counts the number of consecutive least significant bits that are zero in the binary representation of this Byte number.

fun Short.countTrailingZeroBits(): Int

Counts the number of consecutive least significant bits that are zero in the binary representation of this Short number.

© 2010–2020 JetBrains s.r.o. and Kotlin Programming Language contributors

Licensed under the Apache License, Version 2.0.

https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/count-trailing-zero-bits.html