pub unsafe extern "C" fn Dart_StringToUTF8(
    str_: Dart_Handle,
    utf8_array: *mut *mut u8,
    length: *mut isize
) -> Dart_Handle
Expand description

Gets a UTF-8 encoded representation of a String.

Any unpaired surrogate code points in the string will be converted as replacement characters (U+FFFD, 0xEF 0xBF 0xBD in UTF-8). If you need to preserve unpaired surrogates, use the Dart_StringToUTF16 function.

\param str A string. \param utf8_array Returns the String represented as UTF-8 code units. This UTF-8 array is scope allocated and is only valid until the next call to Dart_ExitScope. \param length Used to return the length of the array which was actually used.

\return A valid handle if no error occurs during the operation.