Skip to content

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

License

Notifications You must be signed in to change notification settings

Adamekka/ordinal-type

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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");

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages