pub fn find_indent_of(line: &str, pos: usize) -> (usize, usize)
Expand description
Calculate the number of spaces from pos
to the first non-space character or EOL.
Tabs are expanded to a variable number of spaces with tabstop = 4. Returns relative indent and offset of first non-space character.
assert_eq!(find_indent_of("\tfoo", 0), (4, 1));