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

Method line_len_chars

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

Source from the content-addressed store, hash-verified

65 }
66
67 pub fn line_len_chars(&self, line: usize) -> usize {
68 self.line_text(line)
69 .map(|line| line.graphemes(true).count())
70 .unwrap_or(0)
71 }
72
73 pub fn line_to_char(&self, line: usize) -> usize {
74 let line = line.min(self.line_count().saturating_sub(1));

Callers 1

char_to_positionMethod · 0.45

Calls 1

line_textMethod · 0.45

Tested by

no test coverage detected