module Motion::HTML::NumberToCurrency
Direct including types
Defined in:
motion/html/page_helpers/number_to_currency.crConstant Summary
-
DEFAULT_DELIMITER =
","
-
DEFAULT_DELIMITER_REGEX =
/(\d)(?=(\d\d\d)+(?!\d))/
-
DEFAULT_FORMAT =
"%u%n"
-
DEFAULT_PRECISION =
2
-
DEFAULT_SEPARATOR =
"."
-
DEFAULT_UNIT =
"$"
Instance Method Summary
Instance Method Detail
def number_to_currency(value : Float | Int32 | String, precision : Int32 = DEFAULT_PRECISION, unit : String = DEFAULT_UNIT, separator : String = DEFAULT_SEPARATOR, delimiter : String = DEFAULT_DELIMITER, delimiter_pattern : Regex = DEFAULT_DELIMITER_REGEX, format : String = DEFAULT_FORMAT, negative_format : String = DEFAULT_FORMAT) : String
#