pub fn slice_content(
content: &[TextSpan],
start: usize,
end: usize,
) -> Vec<TextSpan>Expand description
Slice content by the UTF-16 offset range [start, end). Preserves
per-span marks; spans that don’t intersect the range are dropped.
start >= end returns an empty vector. Offsets beyond the content
clamp to the end rather than panicking.