ordinal-type

Crates.ioordinal-type
lib.rsordinal-type
version0.3.0
sourcesrc
created_at2023-04-16 12:54:18.911711
updated_at2023-04-20 19:36:23.646656
descriptionOrdinal type for Rust
homepagehttps://github.com/Adamekka/ordinal-type
repositoryhttps://github.com/Adamekka/ordinal-type
max_upload_size
id840543
size28,593
Adam Cvikl (Adamekka)

documentation

README

Ordinal Type

This crate provides a type Ordinal<T>, that formats an integer as an ordinal number.

Install

Command:

cargo add ordinal-type

Cargo.toml:

[dependencies]
ordinal-type = "*"

Usage

use ordinal_type::Ordinal;

let ordinal = Ordinal(1);
assert_eq!(ordinal.to_string(), "1st");
Commit count: 15

cargo fmt