Skip to main content

rope_line_bytes

Function rope_line_bytes 

Source
pub fn rope_line_bytes(rope: &Rope, row: usize) -> usize
Expand description

Byte length of logical line row (excluding the line separator).

A row at or past len_lines() answers 0 rather than panicking: this is pub, so the row can arrive from a caller holding a position that went stale against a shrunken rope, and ropey::Rope::line panics on one.