s-macro

Crates.ios-macro
lib.rss-macro
version0.1.0
sourcesrc
created_at2023-01-29 12:47:40.173443
updated_at2023-01-29 12:47:40.173443
descriptionA basic Rust library for conveniently making a String.
homepage
repositoryhttps://github.com/zemja/s-macro
max_upload_size
id770888
size4,239
Ethan Ansell (zemja)

documentation

README

s-macro

A basic Rust library for conveniently making a String. Like so:

use s_macro::s;

assert!(s!()                   == String::new());
assert!(s!("hello, world")     == String::from("hello, world"));
assert!(s!(123 + 321)          == format!("{}", 123 + 321));

let world = "world";
assert!(s!("hello, {}", world) == format!("hello, {}", world));
assert!(s!("hello, {world}")   == format!("hello, {world}"));
Commit count: 5

cargo fmt