Answers for "find the length of lua object"

Lua
-1

lua string length

-- One can get the length of a string by using the # (length) operator.
-- The metamethod for this operator is __len.

local str = "Hello world!";
print(#str); -- 5
Posted by: Guest on December-31-2020

Code answers related to "find the length of lua object"

Browse Popular Code Answers by Language