indexing_fmt

Crates.ioindexing_fmt
lib.rsindexing_fmt
version0.1.1
created_at2025-06-18 10:12:14.306074+00
updated_at2025-06-18 10:40:57.381188+00
descriptionFormat superscripts and subscripts easily. (no_std)
homepage
repositoryhttps://github.com/jonaspleyer/indexing_fmt
max_upload_size
id1716824
size21,311
Jonas Pleyer (jonaspleyer)

documentation

README

indexing_fmt

Crates.io Version GitHub Actions Workflow Status License MIT License Apache Docs

This crate allows the formatting of integer types as superscripts or subscripts. It is written in pure safe Rust and no_std compatible.

use indexing_fmt::*;

let index = 12;
let name = format!("Ship{}", index.to_superscript());
assert_eq!(name, "Ship¹²");

let index = 840;
let name = format!("Docking-Bay{}", index.to_subscript());
assert_eq!(name, "Docking-Bay₈₄₀");
Commit count: 4

cargo fmt