LUAL_CHECKLSTRING(3) Library Functions Manual LUAL_CHECKLSTRING(3)

luaL_checklstringchecks whether the function argument is a string, function indicator [-0, +0, v]

#include <lauxlib.h>

const char *
luaL_checklstring(lua_State *L, int narg, size_t *l);

() checks whether the function argument narg is a string and returns this string; if l is not NULL fills *l with the string's length.

This function uses lua_tolstring(3) to get its result, so all conversions and caveats of that function apply here.

lua_tolstring(3)

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

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

July 24, 2022 Debian