Function libnotcurses_sys::notcurses_ucs32_to_utf8[][src]

pub unsafe extern "C" fn notcurses_ucs32_to_utf8(
    ucs32: *const u32,
    ucs32count: c_uint,
    resultbuf: *mut c_uchar,
    buflen: size_t
) -> c_int
Expand description

input functions like notcurses_get() return ucs32-encoded uint32_t. convert a series of uint32_t to utf8. result must be at least 4 bytes per input uint32_t (6 bytes per uint32_t will future-proof against Unicode expansion). the number of bytes used is returned, or -1 if passed illegal ucs32, or too small of a buffer.