countOneBits

Common
inline fun UInt.countOneBits(): Int

Counts the number of set bits in the binary representation of this UInt number.

Since Kotlin

1.5
Common
inline fun ULong.countOneBits(): Int

Counts the number of set bits in the binary representation of this ULong number.

Since Kotlin

1.5
Common
inline fun UByte.countOneBits(): Int

Counts the number of set bits in the binary representation of this UByte number.

Since Kotlin

1.5
Common
inline fun UShort.countOneBits(): Int

Counts the number of set bits in the binary representation of this UShort number.

Since Kotlin

1.5
Common
inline fun Byte.countOneBits(): Int

Counts the number of set bits in the binary representation of this Byte number.

Since Kotlin

1.4
Common
inline fun Short.countOneBits(): Int

Counts the number of set bits in the binary representation of this Short number.

Since Kotlin

1.4
Common
fun Int.countOneBits(): Int

Counts the number of set bits in the binary representation of this Int number.

Since Kotlin

1.4
inline fun Int.countOneBits(): Int

Counts the number of set bits in the binary representation of this Int number.

Since Kotlin

1.4
JS
fun Int.countOneBits(): Int

Counts the number of set bits in the binary representation of this Int number.

Since Kotlin

1.4
Native
external fun Int.countOneBits(): Int

Counts the number of set bits in the binary representation of this Int number.

Since Kotlin

1.4
Common
fun Long.countOneBits(): Int

Counts the number of set bits in the binary representation of this Long number.

Since Kotlin

1.4
inline fun Long.countOneBits(): Int

Counts the number of set bits in the binary representation of this Long number.

Since Kotlin

1.4
JS
fun Long.countOneBits(): Int

Counts the number of set bits in the binary representation of this Long number.

Since Kotlin

1.4
Native
external fun Long.countOneBits(): Int

Counts the number of set bits in the binary representation of this Long number.

Since Kotlin

1.4