num2ordinal
A simple Rust crate for converting integers to ordinal representations, including support for alphabetic and Roman numeral formats.
Features
- Alphabetic Representation: Converts numbers to a base-26 alphabetic representation (e.g., 1 -> A, 27 -> AA).
- Roman Numerals: Converts numbers to their standard Roman numeral representation (up to 1000 using standard Roman numerals).
- Extended Roman Numerals: Converts numbers to extended Roman numerals, supporting values up to 10000 (using extended Roman numerals).
Installation
Add this to your Cargo.toml:
[]
= "0.1"
Usage
Alphabetic Representation
The to_alphabet function converts an integer to its corresponding alphabetic representation, following the Excel-style column naming convention.
use to_alphabet;
Roman Numerals
use to_roman;
Extended Roman Numerals
use to_extended_roman;
License
This crate is licensed under the MIT license. See LICENSE for more details.