Skip to main content

offset_to_location

Function offset_to_location 

Source
pub fn offset_to_location(source: &str, offset: usize) -> Option<Location>
Expand description

Convert a byte offset to a Location with line and column info

Returns None if the offset is out of bounds.