Skip to main content

count_lines

Function count_lines 

Source
pub fn count_lines(text: &str) -> u64
Expand description

Lines in text, as str::lines counts them: a final line needs no newline, and an empty text has none.