mudders
Generate lexicographically-evenly-spaced strings between two strings from pre-defined alphabets.
This is a rewrite of mudderjs; thanks for the original work of the author and their contributors!
Usage
Add a dependency in your Cargo.toml:
= "0.0.1"
Now you can generate lexicographically-spaced strings in a few different ways:
use SymbolTable;
// You can use the included alphabet table
let table = alphabet;
// SymbolTable::mudder() returns a Vec containing `amount` Strings.
let result = table.mudder;
// These strings are always lexicographically placed between `start` and `end`.
let one_string = result.as_str;
assert!;
assert!;
// You can also define your own symbol tables
let table = from_chars.unwrap;
let result = table.mudder;
assert_eq!;
assert!;
assert!;
// The strings *should* be evenly-spaced and as short as they can be.
let table = alphabet;
let result = table.mudder;
assert_eq!;
assert_eq!;
Notes
The most notable difference to Mudder.js is that currently, mudders only
supports ASCII characters (because 127 characters ought to be enough for
everyone™). Our default ::alphabet()
also only has lowercase letters.