Skip to main content

encode_column

Function encode_column 

Source
pub fn encode_column(
    line_text: &str,
    byte_col: usize,
    utf8_positions: bool,
) -> u32
Expand description

Converts a 0-based byte column within line_text into the character offset a backend expects. Columns inside a multi-byte char snap back to that char’s start; columns past the end clamp to the line length.