Mod10(str)
str
Performs a Pad 10-based check digit calculation with the alternating weights 2 and 1, starting at the end of the string. The digits of the values are summed. This check digit calculation method is known as Luhn's algorithm.{$billnr="1234567890";
$checkdigit=mod10($billnr);
$newbillnr=$billnr+$checkdigit;
}$checkdigit is "3"$newbillnr is "12345678903"
OpenText StreamServe 5.6 | Updated: 2013-03-01 |