MCPcopy Create free account
hub / github.com/BabylonJS/BabylonNative / JsCreateString

Function JsCreateString

Dependencies/napi/source/js_native_api_chakra.cc:26–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24}
25
26JsErrorCode JsCreateString(_In_ const char* content, _In_ size_t length, _Out_ JsValueRef* value) {
27 auto str = (length == NAPI_AUTO_LENGTH ? NarrowToWide({ content }) : NarrowToWide({ content, length }));
28 return JsPointerToString(str.data(), str.size(), value);
29}
30
31JsErrorCode JsCopyString(_In_ JsValueRef value, _Out_opt_ char* buffer, _In_ size_t bufferSize, _Out_opt_ size_t* length, UINT codePage = CP_UTF8) {
32 const wchar_t* stringValue;

Callers 7

SetErrorCodeFunction · 0.85
napi_create_functionFunction · 0.85
napi_create_string_utf8Function · 0.85
napi_throw_errorFunction · 0.85
napi_throw_type_errorFunction · 0.85
napi_throw_range_errorFunction · 0.85

Calls 1

NarrowToWideFunction · 0.85

Tested by

no test coverage detected