cur_symbol() = binary() | string()
decimals() = 0..253
see types for erlang:float_to_binary/2
format_number_opts() = #{thousands_sep => binary() | string(), decimal_point => binary() | string(), cur_symbol => cur_symbol(), cur_pos => left | right, cur_sep => binary() | string()}
formatted_number() = binary()
precision() = integer()
format_number/3 | The same as uef_format:format_number/4 with #{} as the forth argument. |
format_number/4 | Formats Number by adding thousands separator between each set of 3 digits to the left of the decimal point, substituting Decimals for the decimal point, and rounding to the specified Precision. |
format_price/1 | Formats Number in price-like style. |
format_price/2 | Formats Number in price-like style. |
format_price/3 | Formats Number in price-like style. |
format_number(Number::number(), Precision::precision(), Decimals::decimals()) -> formatted_number()
The same as uef_format:format_number/4 with #{} as the forth argument. See uef_format:format_number/4 docs.
format_number(Number::number(), Precision::precision(), Decimals::decimals(), Opts::format_number_opts()) -> formatted_number()
Formats Number by adding thousands separator between each set of 3 digits to the left of the decimal point, substituting Decimals for the decimal point, and rounding to the specified Precision. Returns a binary value.
format_price(Number::number()) -> FormattedPrice::formatted_number()
Formats Number in price-like style. Returns a binary containing FormattedPrice formatted with a precision of 2 and decimal digits of 2. The same as uef_format:format_price/2 with a precision of 2 as the second argument. See uef_format:format_price/2 docs.
format_price(Number::number(), Precision::precision()) -> FormattedPrice::formatted_number()
Formats Number in price-like style. Returns a binary containing FormattedPrice formatted with a specified precision as the second argument and decimal digits of 2. The same as uef_format:format_price/3 with #{} as the third argument. See uef_format:format_price/3 docs.
format_price(Number::number(), Precision::precision(), CurrencySymbol_OR_Options::format_number_opts() | cur_symbol()) -> FormattedPrice::formatted_number()
Formats Number in price-like style. Returns a binary containing FormattedPrice formatted with a specified precision as the second argument, decimal digits of 2, and with currency symbol (or options) as the third argument. If CurrencySymbol_OR_Options is a map the functions works as uef_format:format_number/4 with decimal digits of 2 as the third argument and with options as the forth one. If CurrencySymbol_OR_Options is a binary or a string, the corresponding currency symbol is added to the left.
Generated by EDoc