package ordinal_abbreviation

  1. Overview
  2. Docs

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