Function chakracore_sys::JsCopyStringUtf16 [] [src]

pub unsafe extern "system" fn JsCopyStringUtf16(
    value: JsValueRef,
    start: c_int,
    length: c_int,
    buffer: *mut u16,
    written: *mut usize
) -> JsErrorCode

Write string value into Utf16 string buffer When size of the buffer is unknown, buffer argument can be nullptr. In that case, written argument will return the length needed. when start is out of range or < 0, returns JsErrorInvalidArgument and written will be equal to 0. If calculated length is 0 (It can be due to string length or start and length combination), then written will be equal to 0 and call returns JsNoError JavascriptString value start offset of buffer length to be written Pointer to buffer Total number of characters written The code JsNoError if the operation succeeded, a failure code otherwise.