diff options
Diffstat (limited to 'src/string_bytes.h')
-rw-r--r-- | src/string_bytes.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/string_bytes.h b/src/string_bytes.h index 10fee30913..a67bd45e49 100644 --- a/src/string_bytes.h +++ b/src/string_bytes.h @@ -71,11 +71,16 @@ class StringBytes { int* chars_written = nullptr); // Take the bytes in the src, and turn it into a Buffer or String. + // Don't call with encoding=UCS2. static v8::Local<v8::Value> Encode(v8::Isolate* isolate, const char* buf, size_t buflen, enum encoding encoding); + static v8::Local<v8::Value> Encode(v8::Isolate* isolate, + const uint16_t* buf, + size_t buflen); + // Deprecated legacy interface NODE_DEPRECATED("Use IsValidString(isolate, ...)", |