Validate International Securities Identification Number: Difference between revisions
Validate International Securities Identification Number (view source)
Revision as of 14:45, 14 April 2024
, 1 month ago→{{header|langur}}
Langurmonkey (talk | contribs) |
Langurmonkey (talk | contribs) |
||
Line 2,102:
=={{header|langur}}==
The luhn test is repeated here for simplicity
<syntaxhighlight lang="langur">val .luhntest =
val .t = [0, 2, 4, 6, 8, 1, 3, 5, 7, 9]
val .numbers = s2n .s
Line 2,118:
}
val .isintest =
.s -> re/^[A-Z][A-Z][0-9A-Z]{9}[0-9]$/ and
.luhntest(join s2n .s)
|