Skip to main content

js_line_count

Function js_line_count 

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

Line count without materialising the text array.

Splitting is cheap and the count is what a caller needs to size the other three arrays, so this is the one call that does the work up front.