README

#Byte

Constants for the Byte type (8-bit unsigned integer).

#Constants

///|
test {
inspect(@byte.MIN_VALUE, content="b'\\x00'")
inspect(@byte.MAX_VALUE, content="b'\\xFF'")
}

#Byte Literals

MoonBit provides byte literals with the b prefix:

///|
test {
// ASCII character
inspect(b'A'.to_uint64(), content="65")
// Hex escape
inspect(b'\x41'.to_uint64(), content="65")
// Min and max
inspect(b'\x00'.to_uint64(), content="0")
inspect(b'\xff'.to_uint64(), content="255")
}

#
MAX_VALUE

let MAX_VALUE : Byte

Max value constant for this type.

#
MIN_VALUE

let MIN_VALUE : Byte

Min value constant for this type.

#
max_value

#deprecated("Use `MAX_VALUE` instead")
let max_value : Byte

Max value constant for this type.

#
min_value

#deprecated("Use `MIN_VALUE` instead")
let min_value : Byte

Min value constant for this type.

Source Files