Expand description
§Core SWIFT Utility Functions
Low-level parsing utilities for SWIFT MT message primitive data types. These utilities handle basic SWIFT data formats like BIC codes, currency codes, dates, amounts, and character validation.
Functions§
- format_
swift_ amount - Format amount for SWIFT output with comma decimal separator
- format_
swift_ amount_ for_ currency - Format amount for SWIFT output with currency-specific decimal precision
- get_
currency_ decimals - Get the number of decimal places for a currency according to ISO 4217
- normalize_
text - Clean and normalize text (remove extra whitespace, normalize line endings)
- parse_
account - Parse account number (max 34 characters)
- parse_
alphanumeric - Parse alphanumeric string (letters and digits only)
- parse_
amount - Parse amount with optional decimal places
- parse_
amount_ with_ currency - Parse amount with currency-specific decimal validation
- parse_
bic - Parse BIC code (8 or 11 characters)
- parse_
currency - Parse currency code (3 uppercase letters)
- parse_
currency_ non_ commodity - Parse currency code with commodity validation (enforces C08 rule)
- parse_
date_ yymmdd - Parse date in YYMMDD format
- parse_
date_ yyyymmdd - Parse date in YYYYMMDD format
- parse_
datetime_ yymmddhhmm - Parse datetime in YYMMDDHHMM format
- parse_
exact_ length - Parse a string with exact length requirement
- parse_
length_ range - Parse a string with minimum and maximum length
- parse_
max_ length - Parse a string with maximum length limit
- parse_
numeric - Parse numeric string (digits only)
- parse_
reference - Parse reference (16x - alphanumeric, max 16 chars)
- parse_
swift_ chars - Parse SWIFT character set (a-z, A-Z, 0-9, and special chars)
- parse_
swift_ digits - Parse SWIFT digits format (digits only, used for numeric fields)
- parse_
time_ hhmm - Parse time in HHMM format
- parse_
uppercase - Parse uppercase letters only
- split_
at_ first - Split input at first occurrence of delimiter
- split_
at_ newline - Split input at first newline
- validate_
amount_ decimals - Validate amount decimal precision for a specific currency (C03 validation)
- validate_
iban - Validate IBAN format
- validate_
non_ commodity_ currency - Validate that currency is not a commodity code (C08 validation)