Byte Operators
TEAL byte slices are similar to strings and can be manipulated in the same way.
Length
The length of a byte slice can be obtained using the Len
expression. For example:
Len(Bytes("")) # will produce 0
Len(Bytes("algorand")) # will produce 8
Concatenation
Byte slices can be combined using the Concat
expression. This expression takes at least
two arguments and produces a new byte slice consisting of each argument, one after another. For
example:
Concat(Bytes("a"), Bytes("b"), Bytes("c")) # will produce "abc"