iban 2.1.1

A package for handling IBAN numbers


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

IBAN

CI

IBAN is a package that contains functions and static data to work with IBAN (International Bank Account Number) as well as static data about banks.

import iban;

IBANData[string /* ISO two digit country code */] getIBANs();
Bank[] getBanks();

/// Turns a string that follows the IBAN schema into its components
Nullable!IBAN ibanFromString(string s);

/// may not contain a valid iban member
IBAN ibanFromDetails(string isoTwoDigitCountryCode, string bankCode
		, string branchCode , string accountCode);

struct Bank {
	string countryCode;
	bool primary;
	string bic;
	string bankCode;
	Nullable!string checksumAlgo;
	string name;
	string shortName;
}

enum ParseType {
	direct,
	number,
	alpha,
	alphanum,
	space
}

struct Parse {
	ParseType type;
	string direct;
	long number;
}

struct IBANData {
	string countryKey;
	string bbanSpec;
	string ibanSpec;
	long bbanLength;
	long ibanLength;
	long[][string] positions;
	Parse[] bbanSpecRegex;
	Parse[] ibanSpecRegex;
}

struct IBAN {
	string iban;
	string countryCode;
	string bankCode;
	string branchCode;
	string accountCode;
}

This package uses the data from the excellent github.com:mdomke/schwifty.git package.

Run

dmd -run parser.d

to update to a new version to schwifty.

Authors:
  • Robert Schadek
Dependencies:
none
Versions:
2.1.1 2024-Feb-21
2.1.0 2021-Aug-18
2.0.1 2024-Feb-21
2.0.0 2021-Jul-22
1.0.0 2021-Jul-21
Show all 7 versions
Download Stats:
  • 6 downloads today

  • 24 downloads this week

  • 102 downloads this month

  • 6680 downloads total

Score:
2.6
Short URL:
iban.dub.pm