dyn-fmt

Crates.iodyn-fmt
lib.rsdyn-fmt
version0.4.3
sourcesrc
created_at2020-06-07 17:59:07.798724
updated_at2024-09-08 19:00:25.027766
descriptionProvides dynamic string format.
homepage
repositoryhttps://github.com/A1-Triard/dyn-fmt
max_upload_size
id251048
size29,107
Warlock (A1-Triard)

documentation

https://docs.rs/dyn-fmt/

README

maintenance: passively maintained

dyn-fmt

Provides dynamic string format.

use dyn_fmt::AsStrFormatExt;

fn main() {
    assert_eq!("{}a{}b{}c".format(&[1, 2, 3]), "1a2b3c");
    assert_eq!("{}a{}b{}c".format(&[1, 2, 3, 4]), "1a2b3c");
    assert_eq!("{}a{}b{}c".format(&[1, 2]), "1a2bc");
    assert_eq!("{{}}{}".format(&[1, 2]), "{}1");
}

Comparision

dyn-fmt strfmt dynfmt
no_std + - -
Easy but powerfull API that you enjoy using + +/- -
Nice license + +/- +/-
Commit count: 40

cargo fmt