MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / luaL_optlstring

Function luaL_optlstring

src/Chain/libraries/glua/lauxlib.cpp:400–408  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

398
399
400LUALIB_API const char *luaL_optlstring(lua_State *L, int arg,
401 const char *def, size_t *len) {
402 if (lua_isnoneornil(L, arg)) {
403 if (len)
404 *len = (def ? strlen(def) : 0);
405 return def;
406 }
407 else return luaL_checklstring(L, arg, len);
408}
409
410
411LUALIB_API lua_Number luaL_checknumber(lua_State *L, int arg) {

Callers 2

tconcatFunction · 0.85
str_repFunction · 0.85

Calls 1

luaL_checklstringFunction · 0.85

Tested by

no test coverage detected