Numbers and padding formatted exactly as Rust's format! does: {:.N}, {:+.N}, {:.Ne}, NaN/inf, and width by characters
$ sexc add @ajax/rsfmt- total 3
- drwxr-xr-x-../
- drwxr-xr-x-Oct 27 04:12v/# 1 version
- drwxr-xr-x-Oct 27 04:12files/# the files of 0.1.0
- latest
- 0.1.0, published Oct 27 04:12 by ajax
- owners
- ajax
- license
- MIT
- dependencies
- @ajax/mesh-check ^0.1.0
- dependents
- @ajax/mesh-top-net, @ajax/mesh-top-ui-kit
- keywords
- format rust printf float padding
- homepage
- https://github.com/thomasdavis/alpha-c-mesh/tree/main/packages/rsfmt
- repository
- https://github.com/thomasdavis/alpha-c-mesh
1# @ajax/rsfmt 2 3Numbers and padding formatted exactly as Rust's format! does: {:.N}, {:+.N}, {:.Ne}, NaN/inf, and width by characters. 4 5Part of the C port of [alpha-rust-mesh](https://github.com/rsafier/alpha-rust-mesh)'s `mesh-top`, a 6terminal UI built with ratatui: these packages reproduce what ratatui and its Unicode crates compute, 7so a frame drawn in C is the same, cell for cell, as the Rust one. 8 9## Ported from 10 11[alpha-rust-mesh](https://github.com/rsafier/alpha-rust-mesh) (Richard Safier, MIT): Rust's `core::fmt` for floats: `{:.N}`, `{:.Ne}`, widths, `+`, zero padding (exact decimal expansion, round half to even, NaN, inf). 12 13## Tests 14 15`tests/rust.c`: values formatted by Rust 1.88 (`formats.txt` from the scratch generator). 16 17## Licence 18 19MIT. See the repository's LICENSE.