IBAN: Difference between revisions
m
→{{header|Sidef}}: modified code to work with Sidef 2.10
m (→more checking: re-instated original IBAN numbers.) |
m (→{{header|Sidef}}: modified code to work with Sidef 2.10) |
||
Line 2,887:
<lang ruby>func valid_iban(iban) {
static len = Hash.new(
AD
BG=>22, BH
CR=>21, CV=>25, CY
EG=>27, ES=>24, FI=>18, FO
GL=>18, GR=>27, GT=>28, HR=>21, HU
RS=>22, SA=>24, SE=>24, SI=>19, SK=>24, SM=>27, SN=>28, TN=>24, TR=>26,
);
Line 2,904 ⟶ 2,905:
# Validate country code against expected length.
var cc = iban.substr(0, 2);
iban.len == len
# Shift and convert.
|