Expand description

test lint

This crate provides a type Ordinal<T> that formats an Integer type T as an ordinal number (1st, 2nd, 3rd, etc).

Install

Just add the following line to your Cargo.toml file:

[dependencies]
ordinal = "0.3.1"

Example

use ordinal::Ordinal;

fn main() {
	assert_eq!("2nd", Ordinal(2).to_string());
}

Structs

Newtype wrapper struct that formats integers as an ordinal number.