Introduce SIZE_BYTES and SIZE_BITS constants for all integral types
#KT-8247 Fixed
This commit is contained in:
@@ -24,6 +24,16 @@ public inline class UByte internal constructor(private val data: Byte) : Compara
|
||||
* A constant holding the maximum value an instance of UByte can have.
|
||||
*/
|
||||
public const val MAX_VALUE: UByte = UByte(-1)
|
||||
|
||||
/**
|
||||
* The number of bytes used to represent an instance of UByte in a binary form.
|
||||
*/
|
||||
public const val SIZE_BYTES: Int = 1
|
||||
|
||||
/**
|
||||
* The number of bits used to represent an instance of UByte in a binary form.
|
||||
*/
|
||||
public const val SIZE_BITS: Int = 8
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user