MCPcopy Create free account
hub / github.com/F-Stack/f-stack / luaL_optlstring

Function luaL_optlstring

freebsd/contrib/openzfs/module/lua/lauxlib.c:324–332  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

322
323
324LUALIB_API const char *luaL_optlstring (lua_State *L, int narg,
325 const char *def, size_t *len) {
326 if (lua_isnoneornil(L, narg)) {
327 if (len)
328 *len = (def ? strlen(def) : 0);
329 return def;
330 }
331 else return luaL_checklstring(L, narg, len);
332}
333
334
335LUALIB_API lua_Number luaL_checknumber (lua_State *L, int narg) {

Callers 2

str_repFunction · 0.70
tconcatFunction · 0.70

Calls 1

luaL_checklstringFunction · 0.70

Tested by

no test coverage detected