appendUInt8

fun ByteStringBuilder.appendUInt8(value: UByte, validRange: UIntRange = UByte.MIN_VALUE..UByte.MAX_VALUE): ByteStringBuilder

Appends an 8-bit unsigned integer to this ByteStringBuilder.

This function appends the value as a single byte to the end of this ByteStringBuilder. It also validates that the provided value is within the specified validRange. By default the valid range is from UByte.MIN_VALUE to UByte.MAX_VALUE.

Return

This ByteStringBuilder instance, allowing for chaining of operations.

Parameters

value

The unsigned byte value to append.

validRange

The valid range for the unsigned byte value. Defaults to UByte.MIN_VALUE..UByte.MAX_VALUE.

Throws


fun ByteStringBuilder.appendUInt8(value: UInt, validRange: UIntRange = UByte.MIN_VALUE..UByte.MAX_VALUE): ByteStringBuilder

Appends an 8-bit unsigned integer to this ByteStringBuilder.

This function appends the value as a single byte to the end of this ByteStringBuilder. It also validates that the provided value is within the specified validRange. By default, the valid range is from UByte.MIN_VALUE to UByte.MAX_VALUE.

Return

This ByteStringBuilder instance, allowing for chaining of operations.

Parameters

value

The unsigned integer value to append.

validRange

The valid range for the unsigned integer value. Defaults to UByte.MIN_VALUE..UByte.MAX_VALUE.

Throws


fun ByteStringBuilder.appendUInt8(value: Int, validRange: UIntRange = UByte.MIN_VALUE..UByte.MAX_VALUE): ByteStringBuilder

Appends an 8-bit unsigned integer to this ByteStringBuilder.

This function appends the value as a single byte to the end of this ByteStringBuilder. It also validates that the provided value is within the specified validRange. By default, the valid range is from UByte.MIN_VALUE to UByte.MAX_VALUE.

Return

This ByteStringBuilder instance, allowing for chaining of operations.

Parameters

value

The integer value to append.

validRange

The valid range for the unsigned integer value. Defaults to UByte.MIN_VALUE..UByte.MAX_VALUE.

Throws