@@ -3077,9 +3077,10 @@ napi_status napi_get_value_string_latin1(napi_env env,
3077
3077
* `[in] env`: The environment that the API is invoked under.
3078
3078
* `[in] value`: `napi_value` representing JavaScript string.
3079
3079
* `[in] buf`: Buffer to write the ISO-8859-1-encoded string into. If `NULL` is
3080
- passed in, the length of the string (in bytes) is returned.
3080
+ passed in, the length of the string in bytes and excluding the null terminator
3081
+ is returned in `result`.
3081
3082
* `[in] bufsize`: Size of the destination buffer. When this value is
3082
- insufficient, the returned string will be truncated.
3083
+ insufficient, the returned string will be truncated and null-terminated .
3083
3084
* `[out] result`: Number of bytes copied into the buffer, excluding the null
3084
3085
terminator.
3085
3086
@@ -3106,9 +3107,10 @@ napi_status napi_get_value_string_utf8(napi_env env,
3106
3107
* `[in] env`: The environment that the API is invoked under.
3107
3108
* `[in] value`: `napi_value` representing JavaScript string.
3108
3109
* `[in] buf`: Buffer to write the UTF8-encoded string into. If `NULL` is passed
3109
- in, the length of the string (in bytes) is returned.
3110
+ in, the length of the string in bytes and excluding the null terminator is
3111
+ returned in `result`.
3110
3112
* `[in] bufsize`: Size of the destination buffer. When this value is
3111
- insufficient, the returned string will be truncated.
3113
+ insufficient, the returned string will be truncated and null-terminated .
3112
3114
* `[out] result`: Number of bytes copied into the buffer, excluding the null
3113
3115
terminator.
3114
3116
@@ -3134,9 +3136,10 @@ napi_status napi_get_value_string_utf16(napi_env env,
3134
3136
* `[in] env`: The environment that the API is invoked under.
3135
3137
* `[in] value`: `napi_value` representing JavaScript string.
3136
3138
* `[in] buf`: Buffer to write the UTF16-LE-encoded string into. If `NULL` is
3137
- passed in, the length of the string (in 2-byte code units) is returned.
3139
+ passed in, the length of the string in 2-byte code units and excluding the
3140
+ null terminator is returned.
3138
3141
* `[in] bufsize`: Size of the destination buffer. When this value is
3139
- insufficient, the returned string will be truncated.
3142
+ insufficient, the returned string will be truncated and null-terminated .
3140
3143
* `[out] result`: Number of 2-byte code units copied into the buffer, excluding
3141
3144
the null terminator.
3142
3145
0 commit comments