std_macro_extensions/string/
macro.rs

1/// Creates a new `String` instance.
2///
3/// This macro can be used in two forms:
4/// - Without arguments, it creates an empty `String`.
5/// - With a string literal or expression, it creates a `String` initialized with the provided value.
6#[macro_export]
7macro_rules! string {
8    () => {
9        std::string::String::new()
10    };
11    ($s:expr) => {
12        std::string::String::from($s)
13    };
14}