str_indices::lines_crlf

Function count_breaks

Source
pub fn count_breaks(text: &str) -> usize
Expand description

Counts the line breaks in a string slice.

Runs in O(N) time.