stringlit

Crates.iostringlit
lib.rsstringlit
version2.1.0
sourcesrc
created_at2019-04-24 08:44:47.336188
updated_at2023-07-04 08:19:47.995967
descriptionA macro to convert from str to String
homepagehttps://github.com/hardliner66/stringlit
repositoryhttps://github.com/hardliner66/stringlit
max_upload_size
id129838
size3,601
Steve Biedermann (hardliner66)

documentation

README

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());
}
Commit count: 6

cargo fmt