Skip to main content

calculate_indentation_width

Function calculate_indentation_width 

Source
pub fn calculate_indentation_width(indent_str: &str, tab_width: usize) -> usize
Expand description

Calculate the visual indentation width of a string, expanding tabs to spaces.

Per CommonMark, tabs expand to the next tab stop (columns 4, 8, 12, …).