@ -1811,10 +1811,10 @@ NAPI_EXTERN napi_status napi_get_value_string_latin1(napi_env env,
- `[in] value` : `napi_value` representing JavaScript string.
- `[in] value` : `napi_value` representing JavaScript string.
- `[in] buf` : Buffer to write the ISO-8859-1-encoded string into. If NULL is
- `[in] buf` : Buffer to write the ISO-8859-1-encoded string into. If NULL is
passed in, the length of the string (in bytes) is returned.
passed in, the length of the string (in bytes) is returned.
- `[in] bufsize` : Size of the destination buffer.
- `[in] bufsize` : Size of the destination buffer. When this value is
- `[out] result` : Number of bytes copied into the buffer including the null
insufficient, the returned string will be truncated.
terminator. If the buffer size is insufficient, the string will be truncated
- `[out] result` : Number of bytes copied into the buffer, excluding the null
including a null terminator.
terminator.
Returns `napi_ok` if the API succeeded. If a non-String `napi_value`
Returns `napi_ok` if the API succeeded. If a non-String `napi_value`
is passed in it returns `napi_string_expected` .
is passed in it returns `napi_string_expected` .
@ -1837,11 +1837,11 @@ napi_status napi_get_value_string_utf8(napi_env env,
- `[in] env` : The environment that the API is invoked under.
- `[in] env` : The environment that the API is invoked under.
- `[in] value` : `napi_value` representing JavaScript string.
- `[in] value` : `napi_value` representing JavaScript string.
- `[in] buf` : Buffer to write the UTF8-encoded string into. If NULL is passed
- `[in] buf` : Buffer to write the UTF8-encoded string into. If NULL is passed
in, the length of the string (in bytes) is returned.
in, the length of the string (in bytes) is returned.
- `[in] bufsize` : Size of the destination buffer.
- `[in] bufsize` : Size of the destination buffer. When this value is
- `[out] result` : Number of bytes copied into the buffer including the null
insufficient, the returned string will be truncated.
terminator. If the buffer size is insufficient, the string will be truncated
- `[out] result` : Number of bytes copied into the buffer, excluding the null
including a null terminator.
terminator.
Returns `napi_ok` if the API succeeded. If a non-String `napi_value`
Returns `napi_ok` if the API succeeded. If a non-String `napi_value`
is passed in it returns `napi_string_expected` .
is passed in it returns `napi_string_expected` .
@ -1864,10 +1864,10 @@ napi_status napi_get_value_string_utf16(napi_env env,
- `[in] value` : `napi_value` representing JavaScript string.
- `[in] value` : `napi_value` representing JavaScript string.
- `[in] buf` : Buffer to write the UTF16-LE-encoded string into. If NULL is
- `[in] buf` : Buffer to write the UTF16-LE-encoded string into. If NULL is
passed in, the length of the string (in 2-byte code units) is returned.
passed in, the length of the string (in 2-byte code units) is returned.
- `[in] bufsize` : Size of the destination buffer.
- `[in] bufsize` : Size of the destination buffer. When this value is
- `[out] result` : Number of 2-byte code units copied into the buffer including
insufficient, the returned string will be truncated.
the null terminator. If the buffer size is insufficient, the string will be
- `[out] result` : Number of 2-byte code units copied into the buffer, excluding the null
truncated including a null terminator.
terminator.
Returns `napi_ok` if the API succeeded. If a non-String `napi_value`
Returns `napi_ok` if the API succeeded. If a non-String `napi_value`
is passed in it returns `napi_string_expected` .
is passed in it returns `napi_string_expected` .