Function prisma_fmt::offset_to_position
source · pub fn offset_to_position(offset: usize, document: &str) -> Position
Expand description
Converts a byte offset to an LSP position, if the given offset does not overflow the document.