pub fn slice(text: &str, start: usize, end: usize) -> String
text.slice(start, end) with indices in UTF-16 code units, clamped to the text. A surrogate pair cut in half becomes U+FFFD.
text.slice(start, end)