LUA_OBJLEN(3) Library Functions Manual LUA_OBJLEN(3)

lua_objlenreturns the length of the value, function indicator [-0, +0, -]

#include <lua.h>

size_t
lua_objlen(lua_State *L, int index);

() returns the "length" of the value at the given acceptable index: for strings, this is the string length; for tables, this is the result of the length operator ('#'); for userdata, this is the size of the block of memory allocated for the userdata; for other values, it is 0.

Roberto Ierusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes, Lua 5.1 Reference Manual.

The lua_objlen() manual page is based on Lua Reference Manual 5.1 and was created by Sergey Bronnikov.

July 15, 2022 Debian