Skip to main content

position_to_offset

Function position_to_offset 

Source
pub fn position_to_offset(source: &str, position: Position) -> Option<usize>
Expand description

Convert an LSP position into a byte offset. Returns None if the position is past the end of the source.