pub fn word_count(text: &str) -> usizeExpand description
Count words in text.
Words are defined as whitespace-separated sequences.
ยงExample
use html_cleaning::text;
assert_eq!(text::word_count("hello world"), 2);
assert_eq!(text::word_count(""), 0);