interpolate
interpolate copied to clipboard
Very simple Rust string interpolation
If I run the example from the documentation in a new crate: ``` use interpolate::s; fn main() { let name = "Hercules"; let greet = s!("Hello, {name}"); } ``` I...
I want to use this crate in my yew frontend, but I'm getting: > error: cannot produce proc-macro for `interpolate v0.1.1` as the target `wasm32-unknown-unknown` does not support these crate...
How can I replace this call: ```rust format!( "transform-origin: {:.3}% center; transform: translateX({:.3}%) scaleX({:.3});", percent, 100. - percent, self.zoom ) ``` with a call to `interpolate::s`? This doesn't work: ```rust...
I'm on 1.34.0-nightly and tried to do some trivial things with `s!` but I couldn't get my code to compile. I'm using interpolate 0.2.3. My next step was to run...
In JS: ```js var x = 1; var a = "asd" var s = `a ${a + ` x${x + 1} y`} b`; console.log(s); // a asd x2 y b...
I think this crate has potential and I want to use it a lot.. Btw, I also think there should be a shorter way to concatenate strings in Rust than...
Experimental. ```rust use interpolate::fstring; #[fstring] fn foo() { let name = "Hercules"; let greet = f"Hello, {name}"; } ``` [Rendered README](https://github.com/anowell/interpolate/blob/fstring/README.md)