macros-rs

Crates.iomacros-rs
lib.rsmacros-rs
version1.4.1
sourcesrc
created_at2023-04-20 23:27:52.476117
updated_at2024-09-10 02:26:56.563537
descriptionsimple & useful macros
homepage
repositoryhttps://git.furry.win/crates/macros
max_upload_size
id844844
size18,945
Mack (theMackabu)

documentation

README

macros-rs

macros-rs is a simple, lightweight, and useful library for miscellaneous macros.

Getting Started

To get started check out the docs on docs.rs!

// main.rs
use macros_rs::{exp::ternary, fmt::fmtstr};

fn main() {
  let value = true;
  let hello = "hello";

  println!("{:?} world", ternary!(value, fmtstr!("{hello}"), ""));
}
$ cargo run
Compiling project (/crates)
Finished build [unoptimized + debuginfo] target(s)

"hello" world
Commit count: 0

cargo fmt