Skip to main content

offset_to_position

Function offset_to_position 

Source
pub fn offset_to_position(content: &str, offset: usize) -> Position
Expand description

Convert a byte offset to an LSP position (UTF-16 aware, CRLF safe)