[−][src]Function piet::util::line_number_for_position
pub fn line_number_for_position(lines: &[LineMetric], position: usize) -> usize
Returns the index of the line containing this utf8 position, or the last line index if the position is out of bounds.
lines
must not be empty.