Skip to main content

position_to_byte_offset

Function position_to_byte_offset 

Source
pub fn position_to_byte_offset(source: &str, line: u32, character: u32) -> usize
Expand description

Convert an LSP (line, character) position back to a byte offset, where character is interpreted according to the negotiated PositionEncoding.