Skip to main content

byte_offset_to_line_col

Function byte_offset_to_line_col 

Source
pub fn byte_offset_to_line_col(
    line_offsets: &[u32],
    byte_offset: u32,
) -> (u32, u32)
Expand description

Convert a byte offset to a 1-based line number and 0-based byte column.