3 stable releases

2.1.0 Jul 4, 2023
2.0.0 Apr 25, 2019
1.0.0 Apr 24, 2019

#1585 in Rust patterns

Download history 80/week @ 2025-08-16 125/week @ 2025-08-23 119/week @ 2025-08-30 142/week @ 2025-09-06 137/week @ 2025-09-13 149/week @ 2025-09-20 121/week @ 2025-09-27 84/week @ 2025-10-04 110/week @ 2025-10-11 163/week @ 2025-10-18 118/week @ 2025-10-25 93/week @ 2025-11-01 80/week @ 2025-11-08 74/week @ 2025-11-15 72/week @ 2025-11-22 62/week @ 2025-11-29

305 downloads per month
Used in 8 crates (7 directly)

MIT license

3KB

stringlit

A macro to convert from str to String.

// import the macros
//
use stringlit::{s, string};

fn print_string(s: String) {
    println!("{}", s);
}

fn main() {
    // now you can use
    print_string(s!("test"));
    // or
    print_string(string!("test"));
    // instead of
    print_string("test".to_owned());
}

No runtime deps