1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//! Functionality for efficiently generating random text.
use Alphanumeric;
use ;
/// Generate a random "word" of the specified length of random
/// alphanumeric characters.
///
/// # Example
/// ```rust
/// use goose_eggs::text::random_word;
///
/// // Generate a random "word" comprised of 10 alphanumeric characters.
/// let word = random_word(10);
/// assert_eq!(word.len(), 10);
/// ```
/// Generate a random "sentence" comprised of random alphanumeric "words"
/// each ranging between 3 and 12 characters.
///
/// # Example
/// ```rust
/// use goose_eggs::text::random_words;
///
/// // Generate a random "sentence" comprised of 5 alphanumeric "words".
/// let sentence = random_words(5);
/// assert!(sentence.len() >= 3*5 && sentence.len() <= 12*5);
/// ```