format-buf 1.0.0

Drop-in replacement for format! macro, which can write to existing buffer
Documentation
  • Coverage
  • 50%
    1 out of 2 items documented1 out of 1 items with examples
  • Size
  • Source code size: 14.2 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 997.7 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • matklad/format-buf
    5 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • matklad

Build Status Crates.io API reference

Overview

A drop-in replacement for std::format!, which can optionally accept a an existing String buffer.

use format_buf::format;

let mut buf = format!("Roses are {},\n", "red");
let () = format!(buf, "Violets are {}.", "blue");
assert_eq!(buf, "\
    Roses are red,\n\
    Violets are blue.\
")