Function encoding_c::decoder_max_utf8_buffer_length_without_replacement
[−]
[src]
#[no_mangle]pub unsafe extern fn decoder_max_utf8_buffer_length_without_replacement(decoder: *const Decoder,
byte_length: usize)
-> usize
Query the worst-case UTF-8 output size without 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 without
replacement error handling.
Note that this value may be too small for the _with_replacement
case.
Use decoder_max_utf8_buffer_length()
for that case.
Undefined behavior
UB ensues if decoder
is NULL
.