MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / JSFromStdString

Function JSFromStdString

src/openrct2/scripting/ScriptUtil.hpp:124–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122 }
123
124 inline JSValue JSFromStdString(JSContext* ctx, const std::string_view str)
125 {
126 return JS_NewStringLen(ctx, str.data(), str.length());
127 }
128
129 inline std::optional<std::string> JSToOptionalStdString(JSContext* ctx, JSValue obj, const char* property)
130 {

Callers 15

InvokeVehicleCrashHookFunction · 0.85
GameActionResultToJSMethod · 0.85
VisitMethod · 0.85
RunGameActionHooksMethod · 0.85
CallMethod · 0.85
getAllMethod · 0.85
getMethod · 0.85
formatMetadataMethod · 0.85
getDataMethod · 0.85

Calls 1

dataMethod · 0.45

Tested by

no test coverage detected