MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / luaL_optlstring

Function luaL_optlstring

Source/Misc/lua/src/lua.c:10377–10385  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10375
10376
10377LUALIB_API const char *luaL_optlstring (lua_State *L, int narg,
10378const char *def, size_t *len) {
10379if (lua_isnoneornil(L, narg)) {
10380if (len)
10381*len = (def ? strlen(def) : 0);
10382return def;
10383}
10384else return luaL_checklstring(L, narg, len);
10385}
10386
10387
10388LUALIB_API lua_Number luaL_checknumber (lua_State *L, int narg) {

Callers 1

tconcatFunction · 0.85

Calls 1

luaL_checklstringFunction · 0.85

Tested by

no test coverage detected