Skip to main content

offset_of_column

Function offset_of_column 

Source
pub fn offset_of_column(line: &str, column: usize) -> usize
Expand description

The byte offset of cell column’s first content character in line.

Where the caret goes after an operation re-renders the row. Falls back to the end of the line when the column does not exist, which is the honest answer for a ragged row: the caret lands at the row’s end rather than at its start, and the user is where they were looking.