MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / luaL_optlstring

Function luaL_optlstring

extlibs/lua/src/lauxlib.c:409–417  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

407
408
409LUALIB_API const char *luaL_optlstring (lua_State *L, int arg,
410 const char *def, size_t *len) {
411 if (lua_isnoneornil(L, arg)) {
412 if (len)
413 *len = (def ? strlen(def) : 0);
414 return def;
415 }
416 else return luaL_checklstring(L, arg, len);
417}
418
419
420LUALIB_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