pub fn line_end(text: &str, offset: usize) -> usize
End of the logical line holding offset — the byte before the next newline.
offset