Function NewStringFromKnownLiveUTF8Buffer

Source
pub unsafe extern "C" fn NewStringFromKnownLiveUTF8Buffer(
    cx: *mut JSContext,
    buffer: *mut StringBuffer,
    length: usize,
) -> *mut JSString
Expand description

Like NewStringFromUTF8Buffer, but can be used to avoid refcounting overhead in cases where the returned string doesn’t use the buffer. The caller must ensure the buffer outlives this call.