Indexing_fmt: A helper crate to format super¹²³ and sub₈₄₀ scripts

⚓ Rust    📅 2025-06-18    👤 surdeus    👁️ 5      

surdeus

Warning

This post was published 58 days ago. The information described in this article may have changed.

Example

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

Read full topic

🏷️ rust_feed