stackfmt 0.1.2

Write formatted string to a buffer without alloc
Documentation
  • Coverage
  • 100%
    3 out of 3 items documented3 out of 3 items with examples
  • Size
  • Source code size: 9.69 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 863 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • vzvezda/stackfmt
    1 0 1
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • vzvezda

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