#string #combinator #combination #char #big-int

char_combinator

An iterator to create all combination of a given char range

3 stable releases

1.1.2 Dec 16, 2020
1.1.0 Dec 8, 2020
1.0.0 Jul 7, 2020

#1519 in Rust patterns

45 downloads per month

MIT/Apache

8KB
137 lines

char_combinator

An iterator to create all combination of a given char range.

e.g.:

a
b
c
...
aa
ab
ac
...

Features

The iterator uses an u128 as internal counter. If you need more strings than that, you can use the bigint feature.

Example

fn main() {
    for (i, s) in CharCombinator::default().take(104).enumerate() {
        println!("{}: {}", i, s);
    }
}

Dependencies

~97–410KB