package ordinal_abbreviation

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
val to_string : Base.nativeint -> Base.string

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

val to_string_hum : ?delimiter:Base.char -> Base.nativeint -> Base.string

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

val to_suffix : Base.nativeint -> Base.string

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

OCaml

Innovation. Community. Security.