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) -> Position
Expand description

Convert a byte offset in source to a Position whose column unit depends on the negotiated PositionEncoding.