A fantastic crate for fmting numbers using the appropriate unicode characters via the [Display
] trait. ✨ \
Supports vulgar fractions, super- and subscript.
Contributions are welcome for more formats.
Creates beautiful unicode fractions like ¼ or ¹⁰⁄₃. ```rust use fmtastic::VulgarFraction;
asserteq!("¹⁰⁄₃", format!("{}", VulgarFraction::new(10, 3))); asserteq!("¼", format!("{}", VulgarFraction::new(1, 4))); ```
Formats integers as sub- or superscript.
```rust use fmtastic::{Subscript, Superscript};
asserteq!("x₁", format!("x{}", Subscript(1))); asserteq!("n²", format!("n{}", Superscript(2))); ```
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.