package ordinal_abbreviation

  1. Overview
  2. Docs
A minimal library for generating ordinal names of integers.

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v0.17.0.tar.gz
sha256=f90a986b1b6cbf575108049cf34c75ecc1b8f7291732c6406a9934915f89d28d

doc/ordinal_abbreviation/Ordinal_abbreviation/index.html

Module Ordinal_abbreviationSource

Sourcemodule type S = sig ... end

Conversions for Int

include S with type integer := Base.int
Sourceval to_string : Base.int -> Base.string

Produces an ordinal abbreviation string, e.g. to_string 13 = "13th", to_string 100002 = "100002nd", etc.

Sourceval to_string_hum : ?delimiter:Base.char -> Base.int -> Base.string

Produces an ordinal abbreviation string with delimiters every three digits, e.g. to_string 13 = "13th", to_string 100002 = "100_002nd", etc.

Sourceval to_suffix : Base.int -> Base.string

Produces the appropriate ordinal suffix to append to an integer, e.g. to_suffix 3 = "rd", to_suffix 100002 = "nd", etc.

Conversions for Other Built-in Integer Types

Sourcemodule Int32 : S with type integer := Base.int32
Sourcemodule Int63 : S with type integer := Base.Int63.t
Sourcemodule Int64 : S with type integer := Base.int64
Sourcemodule Nativeint : S with type integer := Base.nativeint

Conversions for Arbitrary Integer Types

OCaml

Innovation. Community. Security.