@@ -1811,10 +1811,10 @@ NAPI_EXTERN napi_status napi_get_value_string_latin1(napi_env env,
1811
1811
- ` [in] value ` : ` napi_value ` representing JavaScript string.
1812
1812
- ` [in] buf ` : Buffer to write the ISO-8859-1-encoded string into. If NULL is
1813
1813
passed in, the length of the string (in bytes) is returned.
1814
- - ` [in] bufsize ` : Size of the destination buffer.
1815
- - ` [out] result ` : Number of bytes copied into the buffer including the null
1816
- terminator. If the buffer size is insufficient, the string will be truncated
1817
- including a null terminator.
1814
+ - ` [in] bufsize ` : Size of the destination buffer. When this value is
1815
+ insufficient, the returned string will be truncated.
1816
+ - ` [out] result ` : Number of bytes copied into the buffer, excluding the null
1817
+ terminator.
1818
1818
1819
1819
Returns ` napi_ok ` if the API succeeded. If a non-String ` napi_value `
1820
1820
is passed in it returns ` napi_string_expected ` .
@@ -1837,11 +1837,11 @@ napi_status napi_get_value_string_utf8(napi_env env,
1837
1837
- `[in] env`: The environment that the API is invoked under.
1838
1838
- `[in] value`: `napi_value` representing JavaScript string.
1839
1839
- `[in] buf`: Buffer to write the UTF8-encoded string into. If NULL is passed
1840
- in, the length of the string (in bytes) is returned.
1841
- - `[in] bufsize`: Size of the destination buffer.
1842
- - `[out] result`: Number of bytes copied into the buffer including the null
1843
- terminator. If the buffer size is insufficient, the string will be truncated
1844
- including a null terminator.
1840
+ in, the length of the string (in bytes) is returned.
1841
+ - `[in] bufsize`: Size of the destination buffer. When this value is
1842
+ insufficient, the returned string will be truncated.
1843
+ - `[out] result`: Number of bytes copied into the buffer, excluding the null
1844
+ terminator.
1845
1845
1846
1846
Returns `napi_ok` if the API succeeded. If a non-String `napi_value`
1847
1847
is passed in it returns `napi_string_expected`.
@@ -1864,10 +1864,10 @@ napi_status napi_get_value_string_utf16(napi_env env,
1864
1864
- ` [in] value ` : ` napi_value ` representing JavaScript string.
1865
1865
- ` [in] buf ` : Buffer to write the UTF16-LE-encoded string into. If NULL is
1866
1866
passed in, the length of the string (in 2-byte code units) is returned.
1867
- - ` [in] bufsize ` : Size of the destination buffer.
1868
- - ` [out] result ` : Number of 2-byte code units copied into the buffer including
1869
- the null terminator. If the buffer size is insufficient, the string will be
1870
- truncated including a null terminator.
1867
+ - ` [in] bufsize ` : Size of the destination buffer. When this value is
1868
+ insufficient, the returned string will be truncated.
1869
+ - ` [out] result ` : Number of 2-byte code units copied into the buffer, excluding the null
1870
+ terminator.
1871
1871
1872
1872
Returns ` napi_ok ` if the API succeeded. If a non-String ` napi_value `
1873
1873
is passed in it returns ` napi_string_expected ` .
0 commit comments