Functional Weave
Code in Rust

Tagged money

15 capabilities

money.compare
Compare two amounts of one currency, refusing to compare across currencies; min, max and clamp too.
A group of 4: compare_money, min_money, max_money, clamp_money
money.sum
Total a list of monetary amounts, with an explicit currency for the empty case.
sum_money in Rust
form.money-input
Read a typed amount as minor units for its currency and locale, check min/max, and format it back.
A group of 3: parse_money_input, format_money_input, money_input_format
money.parse
Parse "£1,234.50" or "1.234,50 €" into integer minor units, strictly: no guessing, no rounding.
parse_money in Rust
react.form.money-field React ^19 · TypeScript only
A money input with its currency symbol, locale separators and min/max, read and checked by form.money-input.
Not available in Rust
math.round-div-big
Divide two integers of any size with an explicit rounding mode, on decimal strings, for exact money sums past 2^53.
round_div_big in Rust