#[unsafe(no_mangle)]pub unsafe extern "C" fn JS_ToCStringLen2(
ctx: *mut JsContext,
plen: *mut usize,
val: JsValue,
_cesu8: c_int,
) -> *mut c_charExpand description
JS_ToCStringLen2: the value as a NUL-terminated UTF-8 string, allocated by
crate::js_mallocz’s allocator so JS_FreeCString can release it.
cesu8 is ignored: the engine’s strings carry WTF-8 (lone surrogates preserved as three
bytes), which is what the reference emits for cesu8 = 0 as well.
§Safety
ctx must be a live context, val a live JSValue, and plen null or writable.