Function encoding_c::encoder_max_buffer_length_from_utf16_if_no_unmappables [] [src]

#[no_mangle]
pub unsafe extern fn encoder_max_buffer_length_from_utf16_if_no_unmappables(encoder: *const Encoder,
                                                                            u16_length: usize)
                                                                            -> usize

Query the worst-case output size when encoding from UTF-16 with replacement.

Returns the size of the output buffer in bytes that will not overflow given the current state of the encoder and u16_length number of additional input code units if there are no unmappable characters in the input.