#[no_mangle]
pub unsafe extern "C" fn decoder_max_utf16_buffer_length(
decoder: *const Decoder,
u16_length: usize,
) -> usize
Expand description
Query the worst-case UTF-16 output size (with or without replacement).
Returns the size of the output buffer in UTF-16 code units (char16_t
)
that will not overflow given the current state of the decoder and
byte_length
number of additional input bytes or SIZE_MAX
if size_t
would overflow.
Since the REPLACEMENT CHARACTER fits into one UTF-16 code unit, the
return value of this method applies also in the
_without_replacement
case.
ยงUndefined behavior
UB ensues if decoder
is NULL
.