petname 3.0.0

Generate human readable random names. Usable as a library and from the command-line.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#[cfg(all(feature = "default-rng", feature = "default-words"))]
use petname::petname;

#[test]
#[cfg(all(feature = "default-rng", feature = "default-words"))]
fn petname_renders_desired_number_of_words() {
    assert_eq!(petname(7, "-").unwrap().split('-').count(), 7);
}

#[test]
#[cfg(all(feature = "default-rng", feature = "default-words"))]
fn petname_renders_with_desired_separator() {
    assert_eq!(petname(7, "@").unwrap().split('@').count(), 7);
}