Function ctru_sys::utf8_to_utf16

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

Convert a UTF-8 sequence into a UTF-16 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