LUAL_CHECKSTRING(3) Library Functions Manual LUAL_CHECKSTRING(3)

luaL_checkstringchecks whether the function argument is a string and returns this string, function indicator [-0, +0, v]

#include <lauxlib.h>

const char *
luaL_checkstring(lua_State *L, int narg);

() checks whether the function argument narg is a string and returns this string.

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_checkstring() manual page is based on Lua Reference Manual 5.1 and was created by Sergey Bronnikov.

July 24, 2022 Debian