Skip to main content

byte_offset_to_position

Function byte_offset_to_position 

Source
pub fn byte_offset_to_position(source: &str, byte_offset: usize) -> (u32, u32)
Expand description

Convert a byte offset in source to an (line, column) pair whose column unit depends on the negotiated PositionEncoding.