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

Method line_text_into

src/editor/document.rs:54–65  ·  view source on GitHub ↗
(&self, line: usize, out: &mut String)

Source from the content-addressed store, hash-verified

52 }
53
54 pub fn line_text_into(&self, line: usize, out: &mut String) -> bool {
55 let Some(slice) = self.line(line) else {
56 return false;
57 };
58 out.clear();
59 out.reserve(slice.len_bytes());
60 for chunk in slice.chunks() {
61 out.push_str(chunk);
62 }
63 trim_line_ending(out);
64 true
65 }
66
67 pub fn line_len_chars(&self, line: usize) -> usize {
68 self.line_text(line)

Callers 1

line_textMethod · 0.45

Calls 2

trim_line_endingFunction · 0.85
lineMethod · 0.80

Tested by

no test coverage detected