MCPcopy Create free account
hub / github.com/Eeive/Evcode-ide / slice

Method slice

src/editor/document.rs:209–213  ·  view source on GitHub ↗
(&self, start: usize, end: usize)

Source from the content-addressed store, hash-verified

207 }
208
209 pub fn slice(&self, start: usize, end: usize) -> Option<RopeSlice<'_>> {
210 let start = start.min(self.len_chars());
211 let end = end.min(self.len_chars());
212 (start < end).then(|| self.rope.slice(start..end))
213 }
214
215 pub fn to_string(&self) -> String {
216 let mut text = String::with_capacity(self.rope.len_bytes());

Callers 1

slice_textMethod · 0.80

Calls 1

len_charsMethod · 0.80

Tested by

no test coverage detected