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

Method line_to_char

src/editor/document.rs:73–76  ·  view source on GitHub ↗
(&self, line: usize)

Source from the content-addressed store, hash-verified

71 }
72
73 pub fn line_to_char(&self, line: usize) -> usize {
74 let line = line.min(self.line_count().saturating_sub(1));
75 self.rope.line_to_char(line)
76 }
77
78 pub fn char_to_line(&self, char_idx: usize) -> usize {
79 self.rope.char_to_line(char_idx.min(self.len_chars()))

Callers 8

char_to_positionMethod · 0.80
position_to_charMethod · 0.80
insert_lineMethod · 0.80
delete_lineMethod · 0.80
insert_lineMethod · 0.80
delete_lineMethod · 0.80

Calls 1

line_countMethod · 0.45

Tested by

no test coverage detected