MCPcopy Create free account
hub / github.com/WiseLibs/better-sqlite3 / StringFromUtf8

Function StringFromUtf8

src/util/helpers.cpp:1–4  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1inline Napi::String StringFromUtf8(Napi::Env env, const char* data, int length) {
2 if (length < 0) return Napi::String::New(env, data);
3 return Napi::String::New(env, data, length);
4}
5
6// Node-API has no equivalent of V8's internalized strings, so these are simple
7// aliases of StringFromUtf8; the names are kept to preserve the intent of call

Callers 6

ThrowSqliteErrorMethod · 0.85
LogMethod · 0.85
NODE_METHODFunction · 0.85
xConnectMethod · 0.85
CodeMethod · 0.85
InternalizedFromUtf8Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected