Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

JsCopyString

Jimmy Thomson edited this pageSep 22, 2017 ·6 revisions

Write JavascriptString value into C string buffer (Utf8)

Syntax

CHAKRA_API    JsCopyString(        _In_ JsValueRef value,        _Out_opt_ char* buffer,        _In_ size_t bufferSize,        _Out_opt_ size_t* length);

Parameters

  • value: JavascriptString value
  • buffer: Pointer to buffer
  • bufferSize: Buffer size
  • length: Ifbuffer is non-null, then this will be the number of bytes written into the buffer. Ifbuffer is null, then this will be the number of bytes required to fit the full string.

Return Value

The codeJsNoError if the operation succeeded, a failure code otherwise.

Remarks

This API is experimental and may have breaking change later.

When size of thebuffer 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 invalue.Ifbuffer is non-null andbufferSize is too small to fit the full utf8 string, the process will abort.

Want to contribute to this Wiki?

Clone this wiki locally

[8]ページ先頭

©2009-2025 Movatter.jp