[−][src]Function encoding_c::decoder_max_utf8_buffer_length
#[no_mangle] pub unsafe extern "C" fn decoder_max_utf8_buffer_length(
decoder: *const Decoder,
byte_length: usize
) -> usize
Query the worst-case UTF-8 output size with replacement.
Returns the size of the output buffer in UTF-8 code units (uint8_t
)
that will not overflow given the current state of the decoder and
byte_length
number of additional input bytes when decoding with
errors handled by outputting a REPLACEMENT CHARACTER for each malformed
sequence or SIZE_MAX
if size_t
would overflow.
Undefined behavior
UB ensues if decoder
is NULL
.