Skip to main content

count_lines

Function count_lines 

Source
pub fn count_lines(s: &str) -> u32
Expand description

Count newlines in a string to determine the current 1-based line number. The line after the last newline is the current line being written.