MCPcopy Create free account
hub / github.com/DFHack/dfhack / luaL_optlstring

Function luaL_optlstring

depends/lua/src/lauxlib.c:397–405  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 3

str_repFunction · 0.85
tconcatFunction · 0.85
os_dateFunction · 0.85

Calls 1

luaL_checklstringFunction · 0.85

Tested by

no test coverage detected