Skip to main content

ytext_remove_range

Function ytext_remove_range 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn ytext_remove_range( txt: *const Branch, txn: *mut Transaction, index: u32, length: u32, )
Expand description

Removes a range of characters, starting a a given index. This range must fit within the bounds of a current YText, otherwise this function call will fail.

An index value must be between 0 and the length of a YText (exclusive, accordingly to ytext_len return value).

A length must be lower or equal number of characters (counted as UTF chars depending on the encoding configured by YDoc) from index position to the end of of the string.