MCPcopy Create free account
hub / github.com/PlotJuggler/PlotJuggler / stringField

Function stringField

pj_scripting/src/luau_engine.cpp:141–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139}
140
141std::string stringField(lua_State* L, int table_idx, const char* key, const std::string& fallback = "") {
142 lua_rawgetfield(L, table_idx, key);
143 std::string out = fallback;
144 if (lua_isstring(L, -1)) {
145 out = lua_tostring(L, -1);
146 }
147 lua_pop(L, 1);
148 return out;
149}
150
151std::optional<double> numberField(lua_State* L, int table_idx, const char* key) {
152 lua_rawgetfield(L, table_idx, key);

Callers 4

readEnumValuesFunction · 0.85
readParametersFunction · 0.85
readClassMetadataFunction · 0.85
createInstanceMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected