setBit

fun Byte.setBit(index: Number): Byte

Creates a Byte that is equal to this Byte except the bit at index is set

Return

the new Byte

Parameters

index

the index of the bit to set.


Creates a ByteArray that is equal to this array except the bit at index is set

Return

the new ByteArray

Parameters

index

the index of the bit to set.


fun Int24.setBit(index: Number): Int24

Creates a Int24 that is equal to this Int24 except the bit at index is set

Return

the new Int24

Parameters

index

the index of the bit to set.


fun Int.setBit(index: Number): Int

Creates a Int that is equal to this Int except the bit at index is set

Return

the new Int

Parameters

index

the index of the bit to set.


fun Long.setBit(index: Number): Long

Creates a Long that is equal to this Long except the bit at index is set

Return

the new Long

Parameters

index

the index of the bit to set.


fun Short.setBit(index: Number): Short

Creates a Short that is equal to this Short except the bit at index is set

Return

the new Short

Parameters

index

the index of the bit to set.


fun UByte.setBit(index: Number): UByte

Creates a UByte that is equal to this UByte except the bit at index is set

Return

the new UByte

Parameters

index

the index of the bit to set.


fun UInt24.setBit(index: Number): UInt24

Creates a UInt24 that is equal to this UInt24 except the bit at index is set

Return

the new UInt24

Parameters

index

the index of the bit to set.


fun UInt.setBit(index: Number): UInt

Creates a UInt that is equal to this UInt except the bit at index is set

Return

the new UInt

Parameters

index

the index of the bit to set.


fun ULong.setBit(index: Number): ULong

Creates a ULong that is equal to this ULong except the bit at index is set

Return

the new ULong

Parameters

index

the index of the bit to set.


fun UShort.setBit(index: Number): UShort

Creates a UShort that is equal to this UShort except the bit at index is set

Return

the new UShort

Parameters

index

the index of the bit to set.