Skip to main content

compute_line_start_offset

Function compute_line_start_offset 

Source
pub fn compute_line_start_offset(span: &Span) -> usize
Expand description

Convenience helper: compute the absolute byte offset of the start of the given span’s starting line.

This is exposed as a free function to simplify callers that don’t have a Span method in scope or prefer a function name matching the refactor plan.