stringlit 2.1.0

A macro to convert from str to String
Documentation
  • Coverage
  • 0%
    0 out of 3 items documented0 out of 0 items with examples
  • Size
  • Source code size: 3.27 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 118.03 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Homepage
  • hardliner66/stringlit
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • hardliner66

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());
}