View Source Plausible.Cldr.Number.Symbol (Plausible v0.0.1)

Link to this section Summary

Functions

Returns a list of all decimal symbols defined by the locales configured in this backend as a list.

Returns a list of all decimal symbols defined by the locales configured in this backend as a string.

Returns a list of all grouping symbols defined by the locales configured in this backend as a list.

Returns a list of all grouping symbols defined by the locales configured in this backend as a string.

Returns a map of Cldr.Number.Symbol.t structs of the number symbols for each of the number systems of a locale.

Link to this section Functions

Returns a list of all decimal symbols defined by the locales configured in this backend as a list.

Link to this function

all_decimal_symbols_class()

View Source

Returns a list of all decimal symbols defined by the locales configured in this backend as a string.

This string can be used as a character class when builing a regular expression.

Returns a list of all grouping symbols defined by the locales configured in this backend as a list.

Link to this function

all_grouping_symbols_class()

View Source

Returns a list of all grouping symbols defined by the locales configured in this backend as a string.

This string can be used as a character class when builing a regular expression.

Link to this function

number_symbols_for(locale \\ Plausible.Cldr.get_locale())

View Source
@spec number_symbols_for(Cldr.LanguageTag.t() | Cldr.Locale.locale_name()) ::
  {:ok, map()} | {:error, {module(), String.t()}}

Returns a map of Cldr.Number.Symbol.t structs of the number symbols for each of the number systems of a locale.

options

Options

example

Example:

iex> Plausible.Cldr.Number.Symbol.number_symbols_for(:th)
{:ok, %{
   latn: %Cldr.Number.Symbol{
     decimal: ".",
     exponential: "E",
     group: ",",
     infinity: "∞",
     list: ";",
     minus_sign: "-",
     nan: "NaN",
     per_mille: "‰",
     percent_sign: "%",
     plus_sign: "+",
     superscripting_exponent: "×",
     time_separator: ":"
   },
   thai: %Cldr.Number.Symbol{
     decimal: ".",
     exponential: "E",
     group: ",",
     infinity: "∞",
     list: ";",
     minus_sign: "-",
     nan: "NaN",
     per_mille: "‰",
     percent_sign: "%",
     plus_sign: "+",
     superscripting_exponent: "×",
     time_separator: ":"
   }
 }}
Link to this function

number_symbols_for(locale, number_system)

View Source