[−][src]Function voca_rs::count::count_unique_words
pub fn count_unique_words(subject: &str, pattern: &str) -> usize
Counting occurrences of unique words in subject
. This function respects unicode.
Arguments
subject
- The string to count characters.pattern
- The pattern to watch words.
Example
use voca_rs::*; count::count_unique_words("hello world wonderful world", ""); // => 3 count::count_unique_words("Arabic: أنا قادر على أكل الزجاج و هذا لا يؤلمني. أنا قادر على أكل الزجاج و.", ""); // => ??????????????????????????????????? use voca_rs::Voca; "Hebrew: אני יכול לאכול זכוכית וזה לא מזיק לי. אני יכול לאכול זכוכית."._count_words(""); // => 9