word_iter

Crates.ioword_iter
lib.rsword_iter
version0.2.1
sourcesrc
created_at2021-02-22 13:02:11.265801
updated_at2022-03-13 18:08:57.999078
descriptionSimple Iterator over all words in a string
homepage
repositoryhttps://github.com/nilsmartel/words
max_upload_size
id358981
size4,681
Nils Martel (nilsmartel)

documentation

README

Word Iter

simple rust library to iterate over all words in a given string

Usage

// by using this line, you can call the .words() method in strings
use word_iter::*;

let iter_over_words = "hello world".words();

Now you can do fun stuff like this:

for word in iter_over_words {
    println!("{}", word);
}

Is this library performant?

Yes.

A simple benchmark I ran on the entirety of alice in wonderland (148574 bytes, 27345 words) took 598μs on an 2019 MacBook Pro (2,6 GHz 6-Core Intel Core i7)

Why was this created?

This library was made in order to aid with document analyses, specifically search engine related research.

Commit count: 11

cargo fmt