Function mozjs::jsapi::JS_NewDependentString

source ·
pub unsafe extern "C" fn JS_NewDependentString(
    cx: *mut JSContext,
    str_: Handle<*mut JSString>,
    start: usize,
    length: usize,
) -> *mut JSString
Expand description

Create a dependent string, i.e., a string that owns no character storage, but that refers to a slice of another string’s chars. Dependent strings are mutable by definition, so the thread safety comments above apply.