Indexing_fmt: A helper crate to format super¹²³ and sub₈₄₀ scripts
⚓ Rust 📅 2025-06-18 👤 surdeus 👁️ 15Example
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₈₄₀");
3 posts - 2 participants
🏷️ rust_feed