dev_bestia_string_utils/
macros_mod.rs1#[macro_export]
6macro_rules! s {
7 () => {
8 String::new()
9 };
10 ($my_str: expr) => {
11 $my_str.to_string()
12 };
13 ($literal: expr, $str_1: expr) => {
14 format!($literal, $str_1)
15 };
16 ($literal: expr, $str_1: expr, $str_2: expr) => {
17 format!($literal, $str_1, $str_2)
18 };
19 ($literal: expr, $str_1: expr, $str_2: expr, $str_3: expr) => {
20 format!($literal, $str_1, $str_2, $str_3)
21 };
22 ($literal: expr, $str_1: expr, $str_2: expr, $str_3: expr, $str_4: expr) => {
23 format!($literal, $str_1, $str_2, $str_3, $str_4)
24 };
25}