constcat

Crates.io Version Docs.rs Latest

std::concat! with support for const variables and expressions.

Works on stable Rust ✨.

🚀 Getting started

Add constcat to your Cargo manifest.

toml [dependencies] constcat = "0.1.0"

Import the macro using the following.

rust use constcat::constcat;

🤸 Usage

```rust use constcat::constcat;

const EX: &str = constcat!("string", 10, 'c', true, 3.14, VARIABLE, expr()); assert_eq!(EX, "string10ctrue3.14constcat🎉");

const VARIABLE: &str = env!("CARGOPKGNAME");

const fn expr() -> &'static str { "🎉" } ```

License

Licensed under either of

at your option.