Skip to main content

offset_from_utf16

Function offset_from_utf16 

Source
pub fn offset_from_utf16(text: &Rope, line: u32, character: u32) -> usize
Expand description

The char offset for a protocol position, clamped to the line and to the document. Servers do send out-of-range positions; clamping is the contract, not a bug.