pub fn parse_amount_with_currency(
input: &str,
currency: &str,
) -> Result<f64, ParseError>
Expand description
Parse amount with currency-specific decimal validation
This combines amount parsing with currency-specific decimal precision validation. Use this for amount fields where the currency is known (Field 32A, 32B, etc.)
§Arguments
input
- Amount string to parsecurrency
- ISO 4217 currency code for decimal validation
§Returns
Parsed amount as f64
§Errors
Returns error if:
- Amount format is invalid
- Decimal precision exceeds currency limit (C03)