pub fn slice(s: &str, start: i64, end: Option<i64>) -> Result<String>Expand description
JavaScript-like slice(start, end) using UTF-16 code-unit indices.
Negative indices are relative to the end of the string. Indices are
clamped into [0, len]. If end is None, it defaults to len.