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
52
53
54
55
//! # Pattern Tools
/// A macro to concatenate multiple string literals with a specified separator.
///
/// # Examples
///
/// ```rust
/// use wordchipper::join_strs;
///
/// // Concatenating string literals with a comma as the separator
/// let result = join_strs!(",", ("Hello", "World", "Rust"));
/// assert_eq!(result, "Hello,World,Rust");
///
/// // Concatenating string literals with a dash as the separator
/// let result = join_strs!("-", ("A", "B", "C"));
/// assert_eq!(result, "A-B-C");
///
/// // Concatenating a single string literal without a separator
/// let result = join_strs!(";", ("OnlyOne"));
/// assert_eq!(result, "OnlyOne");
/// ```
///
/// # Parameters
///
/// - `$sep`: A string literal used as a separator between the provided string
/// literals.
/// - `($first $(, $rest)*)`: A tuple of at least one string literal. The first
/// string literal is mandatory, and the rest are optional. A trailing comma
/// is allowed but not required.
;
}
/// An extension of [`join_strs!()`] which uses the "|" as the seperator.