Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/matklad/format-buf
https://github.com/matklad/format-buf
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/matklad/format-buf
- Owner: matklad
- License: apache-2.0
- Created: 2019-07-20T16:46:11.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-07-20T16:59:03.000Z (over 5 years ago)
- Last Synced: 2024-08-09T03:52:10.002Z (3 months ago)
- Language: Rust
- Size: 5.86 KB
- Stars: 5
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.org/matklad/format-buf.svg?branch=master)](https://travis-ci.org/matklad/format-buf)
[![Crates.io](https://img.shields.io/crates/v/format-buf.svg)](https://crates.io/crates/format-buf)
[![API reference](https://docs.rs/format-buf/badge.svg)](https://docs.rs/format-buf/)# Overview
A drop-in replacement for `std::format!`, which can optionally accept an
existing `String` buffer.```rust
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.\
")