Function yrs::yxmltext_insert
source · #[no_mangle]
pub unsafe extern "C" fn yxmltext_insert(
txt: *const Branch,
txn: *mut Transaction,
index: u32,
str: *const c_char,
attrs: *const YInput
)
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 YXmlText
(inclusive, accordingly to yxmltext_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.
A nullable pointer with defined attrs
will be used to wrap provided text with
a formatting blocks. attrs
must be a map-like type.