pub fn line_to_byte(content: &str, line: usize) -> usizeExpand description
Convert a 1-based line number to byte offset in content. Clamps to content length for safety (last line may not have trailing newline).
Uses char_indices to locate actual newline bytes, ensuring the returned
offset always lands on a valid UTF-8 character boundary regardless of
multi-byte characters or CRLF line endings.