Crates.io | ordinal-type |
lib.rs | ordinal-type |
version | 0.3.0 |
source | src |
created_at | 2023-04-16 12:54:18.911711 |
updated_at | 2023-04-20 19:36:23.646656 |
description | Ordinal type for Rust |
homepage | https://github.com/Adamekka/ordinal-type |
repository | https://github.com/Adamekka/ordinal-type |
max_upload_size | |
id | 840543 |
size | 28,593 |
This crate provides a type Ordinal<T>
, that formats an integer as an ordinal number.
Command:
cargo add ordinal-type
Cargo.toml:
[dependencies]
ordinal-type = "*"
use ordinal_type::Ordinal;
let ordinal = Ordinal(1);
assert_eq!(ordinal.to_string(), "1st");