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
44
45
46
47
48
49
50
51
//! Multiple String related functions
use SampleString;
use Alphanumeric;
/// Generates a random URL-safe string of the specified length.
///
/// # Arguments
///
/// * `n` - The length of the generated string.
///
/// # Returns
///
/// A `String` containing `n` random alphanumeric characters (`A-Z`, `a-z`, `0-9`).
///
/// # Examples
///
/// ```
/// use bt_string_utils::generate_url_safe_string;
/// let random_string = generate_url_safe_string(16);
/// println!("Generated string: {}", random_string);
/// ```
///
/// # Notes
///
/// - Uses the `rand` crate to generate random alphanumeric characters.
/// - Ensures the output contains only **URL-safe** characters.
/// - May require the `rand` crate in your Cargo.toml:
///