fmtastic ✨
A fantastic, #![no_std]-friendly crate for fmting numbers using the appropriate unicode characters via the Display trait. ✨
Format as vulgar fractions, super- and subscript and more.
Contributions are welcome for more formats.
Features
Vulgar Fractions
Creates beautiful unicode fractions like ¼ or ¹⁰⁄₃.
use VulgarFraction;
assert_eq!;
assert_eq!;
Sub- and superscript
Formats integers as sub- or superscript.
use ;
assert_eq!;
assert_eq!;
Roman Numerals
Formats unsigned integers as Roman numerals.
use Roman;
assert_eq!; // lowercase
assert_eq!;
assert_eq!; // ascii
assert_eq!; // u8's can always be formatted as Roman numeral
Seven-Segment Digits
Formats an unsigned integer using seven-segment digits from the Legacy Computing block.
use Segmented;
assert_eq!;
Outlined
Formats an unsigned integer using outlined digits from the Legacy Computing Supplement block.
use Outlined;
assert_eq!;
Tally Marks
Formats an unsigned integer as tally marks.
use TallyMarks;
assert_eq!;
assert_eq!;
Ballot Box
Formats a boolean as a ballot box.
use BallotBox;
assert_eq!;
assert_eq!;
assert_eq!;
Docs
License
Licensed under either of
- Unlicense (unlicense.txt or https://unlicense.org/)
- Apache License, Version 2.0 (license-apache.txt or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (license-mit.txt or http://opensource.org/licenses/MIT)
at your option.
Contribution
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 multi-licensed as above, without any additional terms or conditions.