This crate provides a type Ordinal<T>, that formats an integer as an ordinal number.
Ordinal<T>
Command:
cargo add ordinal-type
Cargo.toml:
[dependencies] ordinal-type = "*"
use ordinal_type::Ordinal; let ordinal = Ordinal(1); assert_eq!(ordinal.to_string(), "1st");