Function ctru_sys::utf16_to_utf8

source ·
pub unsafe extern "C" fn utf16_to_utf8(
    out: *mut u8,
    in_: *const u16,
    len: usize
) -> isize
Expand description

Convert a UTF-16 sequence into a UTF-8 sequence

Fills the output buffer up to len code units. Returns the number of code units that the input would produce; if it returns greater than len, the output has been truncated.

§Arguments

  • out (direction out) - Output sequence
  • in (direction in) - Input sequence (null-terminated)
  • len (direction in) - Output length

§Returns

number of output code units produced -1 for error

Note: out is not null-terminated