Function mozjs::jsapi::JS_NewMaybeExternalStringUTF8
source ยท pub unsafe extern "C" fn JS_NewMaybeExternalStringUTF8(
cx: *mut JSContext,
utf8: *const UTF8Chars,
callbacks: *const JSExternalStringCallbacks,
allocatedExternal: *mut bool,
) -> *mut JSString
Expand description
Similar to JS_NewMaybeExternalStringLatin1.
Create an external Latin1 string if the utf8 buffer contains only ASCII chars, otherwise copy the chars into a non-external string.