Skip to main content

slice

Function slice 

Source
pub fn slice(text: &str, start: usize, end: usize) -> String
Expand description

text.slice(start, end) with indices in UTF-16 code units, clamped to the text. A surrogate pair cut in half becomes U+FFFD.