#word #iterator #string

word_iter

Simple Iterator over all words in a string

3 unstable releases

0.2.1 Mar 13, 2022
0.2.0 Feb 17, 2022
0.1.0 Feb 22, 2021

#1170 in Rust patterns

Download history 71/week @ 2024-07-20 63/week @ 2024-07-27 73/week @ 2024-08-03 45/week @ 2024-08-10 35/week @ 2024-08-17 261/week @ 2024-08-24 970/week @ 2024-08-31 880/week @ 2024-09-07 747/week @ 2024-09-14 849/week @ 2024-09-21 952/week @ 2024-09-28 1048/week @ 2024-10-05 1087/week @ 2024-10-12 941/week @ 2024-10-19 827/week @ 2024-10-26 677/week @ 2024-11-02

3,700 downloads per month

MIT license

4KB
77 lines

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.

No runtime deps