Buffer .. var

Buffer concatenation allow to append two buffers to each other, or to concatenate a Buffer with a string (using default UTF8 encoding). The result of the concatenation is a third Buffer.

Example

local buff1 = sys.Buffer { 97, 98, 99 } -- "abc" in utf8 local buff2 = sys.Buffer { 100, 101, 102 } -- "def" in utf8 local concat1 = buff1..buff2 -- outputs 6 print(#concat1)