bytes.append

bytes.append

bytes.append

Function

Append data and return new Bytes.

Syntax

Parameters

ParametersTypeRequiredDefault valueDescription
dataString/Array/BytesYesNoneThe data to append. String is encoded in UTF-8; Array elements must be 0 to 255; Bytes appends raw bytes directly.

Return value

TypeDescription
BytesNew Bytes after appending.

Code Example

Notes

  • append() does not modify the original Bytes.
  • The total length after appending is still limited by BT_BYTES_LIMIT.