Function libnotcurses_sys::ffi::ncstrwidth_valid [−][src]
pub unsafe extern "C" fn ncstrwidth_valid(
egcs: *const c_char,
validbytes: *mut c_int,
validwidth: *mut c_int
) -> c_int
Expand description
Returns the number of columns occupied by a the valid prefix of a multibyte (UTF-8) string. If an invalid character is encountered, -1 will be returned, and the number of valid bytes and columns will be written into *|validbytes| and *|validwidth| (assuming them non-NULL). If the entire string is valid, *|validbytes| and *|validwidth| reflect the entire string.