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

Method char_to_line

src/editor/document.rs:78–80  ·  view source on GitHub ↗
(&self, char_idx: usize)

Source from the content-addressed store, hash-verified

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()))
80 }
81
82 pub fn char_to_position(&self, char_idx: usize) -> (usize, usize) {
83 let char_idx = char_idx.min(self.len_chars());

Callers 3

char_to_positionMethod · 0.80

Calls 1

len_charsMethod · 0.80

Tested by

no test coverage detected