Read the UTF8-encoded string value from lynx_value. lynx_api_string_expected is returned if the types do not match. If the buf argument is passed NULL, the length of the string in bytes and excluding the null terminator is returned in result.
| Key | Description |
|---|---|
| [in] env | The environment in which lynx value runs, typically nullptr. |
| [in] value | lynx_value value to be represented in lynx_value. |
| [in] buf | Buffer to write the UTF8-encoded string into. If NULL is passed in, the length of the string in bytes and excluding the null terminator is returned in result. |
| [in] bufsize | Size of the destination buffer. If this value is zero, then the string is not returned and no changes are done to the buffer. |
| [out] result | Number of bytes copied into the buffer, excluding the null terminator. |
Returns lynx_api_ok if the API succeeded. Returns lynx_api_string_expected if the types do not match.