Search documentation of bb

# BB.Cldr.Number.Formatter.Decimal (bb v0.8.0)

View Source

# Summary

## Functions

metadata!(format)
to_string(number, format, options \\ [])

Formats a number according to a decimal format string.

# Functions

# metadata!(format)

# to_string(number, format, options \\ [])

    @spec to_string(
      Cldr.Math.number_or_decimal(),
      String.t() | Cldr.Number.Format.Meta.t(),
      Keyword.t() | Cldr.Number.Format.Options.t()
    ) :: {:ok, String.t()} | {:error, {module(), String.t()}}

Formats a number according to a decimal format string.

## Arguments

- `number` is an integer, float or Decimal

- `format` is a format string. See `BB.Cldr.Number` for further information.

- `options` is a map of options. See `BB.Cldr.Number.to_string/2` for further information.