MCPcopy Create free account
hub / github.com/nodejs/nan / widenString

Function widenString

nan.h:1424–1433  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1422
1423namespace imp {
1424inline void
1425widenString(std::vector<uint16_t> *ws, const uint8_t *s, int l) {
1426 size_t len = static_cast<size_t>(l);
1427 if (l < 0) {
1428 len = strlen(reinterpret_cast<const char*>(s));
1429 }
1430 assert(len <= INT_MAX && "string too long");
1431 ws->resize(len);
1432 std::copy(s, s + len, ws->begin()); // NOLINT(build/include_what_you_use)
1433}
1434} // end of namespace imp
1435
1436 inline MaybeLocal<v8::String>

Callers 1

NewOneByteStringFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected