SYNOPSIS
Package helper to compute an IBAN key, generate and format an IBAN from a BBAN and the country code.
to_digit $bban=$_
Converts alpha characters into digit, following IBAN rules: replaces each alpha character with 2 digits A = 10, B = 11, ..., Z = 35.
$bban
A string to convert into the IBAN digit representation.
returns a string representation of the Basic Bank Account Number (BBAN), which contains only digits.
compute_key $country_code, $bban
Computes the key corresponding to a given International Bank Account Number (IBAN) when
$country_code A string representation of the country code converted into IBAN digits.
$bban A string representation of the Basic Bank Account Number (BBAN)
with its key part and converted into IBAN digits.
returns the IBAN key computed.
get_IBAN $country_code, $bban
Computes and returns the International Bank Account Number (IBAN) corresponding to the given country code and Basic Bank Account Number (BBAN). where
$country_code is the country code (i.e. "FR" for France, "DE" for Germany, etc.).
$bban is the Basic Bank Account Number (BBAN).
returns a string representation of the International Bank Account Number (IBAN) with the key part. The returned IBAN can contains alpha and digit characters.
format_with_spaces $iban
Formats the IBAN provided and separate each 4 digit with a space.
$iban an IBAN
returns the IBAN separated each 4 digit with a space.