-
Notifications
You must be signed in to change notification settings - Fork 1.2k
JsCopyString
Jimmy Thomson edited this page Sep 22, 2017
·
6 revisions
Write JavascriptString value into C string buffer (Utf8)
CHAKRA_API
JsCopyString(
_In_ JsValueRef value,
_Out_opt_ char* buffer,
_In_ size_t bufferSize,
_Out_opt_ size_t* length);
- value: JavascriptString value
- buffer: Pointer to buffer
- bufferSize: Buffer size
-
length: If
bufferis non-null, then this will be the number of bytes written into the buffer. Ifbufferis null, then this will be the number of bytes required to fit the full string.
The code JsNoError if the operation succeeded, a failure code otherwise.
This API is experimental and may have breaking change later.
When size of the buffer is unknown, buffer argument can be nullptr.
In that case, length argument will return the length needed to accommodate all the UTF8 decoded bytes present in value.
If buffer is non-null and bufferSize is too small to fit the full utf8 string, the process will abort.
- Architecture Overview
- Building ChakraCore
- ChakraCore Code Structure
- Contributor Guidance
- Engineering Notes
- Embedding ChakraCore
- Testing ChakraCore
- Getting ChakraCore binaries
- Label Glossary
- Resources
- Roadmap / Release Notes
Want to contribute to this Wiki? Fork it and send a pull request!