iso7064_check_digit

Function iso7064_check_digit 

Source
pub fn iso7064_check_digit<S>(value: S) -> Option<char>
where S: AsRef<str>,
Expand description

Calculate check digit IAW ISO 7064, MOD 11-2

“MOD 11-2” means modulus = 11 and radix = 2

§Example

use acorn_lib::schema::pid::iso7064_check_digit;

assert_eq!(iso7064_check_digit("0000000220579115"), 5);
assert_eq!(iso7064_check_digit("0000-0002-2057-9115"), 5);