Function mozjs_sys::jsapi::JS::EncodeUtf8ToNarrow

source ยท
pub unsafe extern "C" fn EncodeUtf8ToNarrow(
    cx: *mut JSContext,
    chars: *const c_char,
) -> UniqueChars
Expand description

Encode a UTF-8 string to a narrow multibyte character string.

NOTE: Should only be used when interacting with POSIX/OS functions and not for encoding UTF-8 to ASCII/Latin-1/etc. strings.