Minimal macro for easy String creation and concatenation in Rust.
use smacros::s;
let s1 = s!("hello"); // From single value
let s2 = s!("a", "b", 42); // Concatenation
let empty = s!(); // Empty StringConverts any ToString value to String
Concatenates multiple values
Zero dependencies
Zero-cost abstraction
Add to Cargo.toml:
[dependencies]
s-macro = "0.1"This version:
- Keeps all essential information
- Has working badges
- Shows basic usage
- Lists key features
- Includes installation instructions
- Is short enough to copy-paste directly
For publishing:
- Run
cargo publish --dry-runfirst - Then
cargo publish - Docs will auto-build on docs.rs