pub fn insert_at(
text: &str,
start: usize,
end: usize,
insert: &str,
) -> (String, usize)Expand description
text with insert put in place of the selection from start to end, and where the caret
lands after it. Positions count UTF-16 code units, as the browser counts them; a backwards
selection is the same selection, and a position past the end is the end.