Skip to main content

count_lines_words

Function count_lines_words 

Source
pub fn count_lines_words(data: &[u8], utf8: bool) -> (u64, u64)
Expand description

Count lines and words using optimized strategies per locale. UTF-8: fused single-pass for lines+words to avoid extra data traversal. C locale: AVX2 SIMD fused counter when available, scalar fallback otherwise.