Function encoding_c::encoder_encode_from_utf8
[−]
[src]
#[no_mangle]pub unsafe extern fn encoder_encode_from_utf8(
encoder: *mut Encoder,
src: *const u8,
src_len: *mut usize,
dst: *mut u8,
dst_len: *mut usize,
last: bool,
had_replacements: *mut bool
) -> u32
Incrementally encode into byte stream from UTF-8 with unmappable characters replaced with HTML (decimal) numeric character references.
The input absolutely MUST be valid UTF-8 or the behavior is memory-unsafe! If in doubt, check the validity of input before using!
See the top-level FFI documentation for documentation for how the
encoder_encode_* functions are mapped from Rust and the documentation
for the Encoder struct for the semantics.
UB ensues if encoder is NULL, src and src_len don't designate a
valid block of memory, dst and dst_len don't designate a valid block
of memory, had_replacements is NULL or the input is not valid UTF-8.