pub unsafe extern "C-unwind" fn JSStringGetUTF8CString(
string: JSStringRef,
buffer: *mut c_char,
buffer_size: usize,
) -> usize
Available on crate features
JSStringRef
and JSBase
only.Expand description
Converts a JavaScript string into a null-terminated UTF8 string, and copies the result into an external byte buffer.
Parameter string
: The source JSString.
Parameter buffer
: The destination byte buffer into which to copy a null-terminated
UTF8 representation of string. On return, buffer contains a UTF8 string
representation of string. If bufferSize is too small, buffer will contain only
partial results. If buffer is not at least bufferSize bytes in size,
behavior is undefined.
Parameter bufferSize
: The size of the external buffer in bytes.
Returns: The number of bytes written into buffer (including the null-terminator byte).