# Buffer length operator

The length operator # applied on a Buffer object returns the total number of bytes it contains.

Example

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