static_format

Crates.iostatic_format
lib.rsstatic_format
version0.0.3
sourcesrc
created_at2024-01-09 20:43:47.415951
updated_at2024-01-09 22:29:41.392744
descriptionFormat strings with no runtime overhead.
homepage
repositoryhttps://github.com/Omena-Palette/static_format
max_upload_size
id1094588
size9,811
Cleve Green (CleveGreen)

documentation

README

Const Format

A simple macro which just makes concat! more ergonomic / easier to read.

use static_format::const_format;

macro_rules! period {
    () => {'.'}
}

fn main() {
    let formatted = const_format!(
        "{}, there are {} formatted {}{}",
        "Hello", 4, "arguments", period!()
    );
    assert_eq!(formatted, "Hello, there are 4 formatted arguments.");
}
Commit count: 0

cargo fmt