Skip to content

Commit f633fbd

Browse files
tux3mhdawson
authored andcommitted
string.md: Document existing New(env, value, length) APIs
PR-URL: #486 Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: NickNaso <[email protected]>
1 parent aaea55e commit f633fbd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

doc/string.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ Napi::String::New(napi_env env, const std::string& value);
5656
Napi::String::New(napi_env env, const std::u16::string& value);
5757
Napi::String::New(napi_env env, const char* value);
5858
Napi::String::New(napi_env env, const char16_t* value);
59+
Napi::String::New(napi_env env, const char* value, size_t length);
60+
Napi::String::New(napi_env env, const char16_t* value, size_t length);
5961
```
6062
6163
- `[in] env`: The `napi_env` environment in which to construct the `Napi::Value` object.
@@ -64,6 +66,7 @@ Napi::String::New(napi_env env, const char16_t* value);
6466
- `std::u16string&` - represents a UTF16-LE string.
6567
- `const char*` - represents a UTF8 string.
6668
- `const char16_t*` - represents a UTF16-LE string.
69+
- `[in] length`: The length of the string (not necessarily null-terminated) in code units.
6770
6871
Returns a new `Napi::String` that represents the passed in C++ string.
6972

0 commit comments

Comments
 (0)