3 stable releases

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

#1731 in Rust patterns

Download history 39/week @ 2025-06-18 58/week @ 2025-06-25 85/week @ 2025-07-02 90/week @ 2025-07-09 67/week @ 2025-07-16 56/week @ 2025-07-23 53/week @ 2025-07-30 97/week @ 2025-08-06 76/week @ 2025-08-13 116/week @ 2025-08-20 106/week @ 2025-08-27 172/week @ 2025-09-03 114/week @ 2025-09-10 129/week @ 2025-09-17 141/week @ 2025-09-24 137/week @ 2025-10-01

555 downloads per month
Used in 7 crates (6 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