Create a string value from a UTF8-encoded C string. The native string is copied.
| Key | Description |
|---|---|
| [in] env | The environment in which lynx value runs, typically nullptr. |
| [in] str | Character buffer representing a UTF8-encoded string. |
| [in] length | The length of the string in bytes. |
| [out] result | A lynx_value representing a string. |
Returns lynx_api_ok if the API succeeded.
It creates an object on the heap, whose memory is managed by reference count, and calls lynx_value_remove_reference to free it when it is used up.