MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / stringView

Method stringView

source/core/StarLua.cpp:788–796  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

786}
787
788StringView LuaEngine::stringView(int handleIndex) {
789 if (m_nullTerminated > 0)
790 return StringView(lua_tostring(m_handleThread, handleIndex));
791 else {
792 size_t len = 0;
793 const char* data = lua_tolstring(m_handleThread, handleIndex, &len);
794 return StringView(data, len);
795 }
796}
797
798LuaValue LuaEngine::tableGet(bool raw, int handleIndex, LuaValue const& key) {
799 lua_checkstack(m_state, 1);

Callers 1

viewMethod · 0.80

Calls 2

StringViewClass · 0.85
lua_tolstringFunction · 0.85

Tested by

no test coverage detected