Function yrs::ytext_insert [−][src]
#[no_mangle]
pub unsafe extern "C" fn ytext_insert(
txt: *const Text,
txn: *mut Transaction,
index: c_int,
value: *const c_char
)
Expand description
Inserts a null-terminated UTF-8 encoded string a a given index
. index
value must be between
0 and a length of a YText
(inclusive, accordingly to ytext_len return value), otherwise this
function will panic.
A str
parameter must be a null-terminated UTF-8 encoded string. This function doesn’t take
ownership over a passed value - it will be copied and therefore a string parameter must be
released by the caller.