stackfmt

Crates.iostackfmt
lib.rsstackfmt
version0.1.2
sourcesrc
created_at2021-07-19 02:31:39.763453
updated_at2021-11-12 04:18:39.104781
descriptionWrite formatted string to a buffer without alloc
homepage
repositoryhttps://github.com/vzvezda/stackfmt
max_upload_size
id424563
size10,008
(vzvezda)

documentation

README

stackfmt

Creates formatted string from format_args!() like alloc::fmt::format() but without allocation:

let mut buf = [0u8; 64];
let formatted: &str = stackfmt::fmt_truncate(&mut buf, format_args!("Hello{}", 42));
assert_eq!(formatted, "Hello42");

Implemented based on this SO answer https://stackoverflow.com/a/50201632/601298

Commit count: 3

cargo fmt