Structsยง
- Monetary
Value - MonetaryValues is a struct that paris a CurrencyCode with a value. This structure is able to represent both positive and negative currencies.
- Monetary
Value ๐Visitor
Functionsยง
- determine_
pre_ ๐and_ post_ decimal_ strings - determine_pre_and_post_decimal_strings attempts to determine if there is a decimal point in the value string, and if so, it will returned the split string based on the location of the decimal point.
- is_
ascii_ ๐digit - is_ascii_digit is a convenience function for converting char::is_ascii_digit into a function that conforms to [Pattern].
- is_
possibly_ ๐a_ decimal_ point - parse_
pre_ ๐and_ post_ decimal_ digits - reorder_
currency_ ๐code_ and_ value - Reorder the currency code and the value strings into the expected order. This is done to simplify the down-stream parsing logic as we will be able to assume that the first element of the pair is the string containing the currency code, and the second part of the pair is the portion of the string that contains the monetary value.
- split_
str_ ๐into_ currency_ code_ and_ value_ string - Split a string into a currency code and a value strings in order to simplify parsing the string into a MonetaryValue.