varunsrin / rusty_money

Money library for Rust
MIT License
86 stars 32 forks source link

Sanity check digit seperation on parsed string #29

Closed sjoerdsimons closed 4 years ago

sjoerdsimons commented 4 years ago

It's quite easy to confuse the exponent seperator and digit seperation especially when working with different currencies. Luckily the digit seperation pattern is different from the exponent size in most currencies, which means that sanity checking the digit seperation should catch most of those mistakes.

Signed-off-by: Sjoerd Simons sjoerd@luon.net

varunsrin commented 4 years ago

this is great, thank you for writing this and adding tests.