Liking cljdoc? Tell your friends :D
All platforms.

brazilian-utils.currency.core


format-currencyclj/s

(format-currency value)
(format-currency value opts-or-precision)

Formats a number as BRL (uses comma decimal and dot thousand).

Inputs:

  • value: number (int/float/decimal)
  • opts-or-precision: either integer precision or {:precision n}

Output: string like "1.234,56".

Formats a number as BRL (uses comma decimal and dot thousand).

 Inputs:
 - value: number (int/float/decimal)
 - opts-or-precision: either integer precision or {:precision n}

Output: string like "1.234,56".
sourceraw docstring

parseclj/s

(parse value)

Parses a BRL-formatted string into a number (double).

Accepts input with or without "R$" and separators. Nil/blank returns 0.0. Example: "R$ 1.234,56" => 1234.56

Parses a BRL-formatted string into a number (double).

Accepts input with or without "R$" and separators. Nil/blank returns 0.0.
Example: "R$ 1.234,56" => 1234.56
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close