Skip to content

Latest commit

 

History

History
10 lines (8 loc) · 317 Bytes

README.md

File metadata and controls

10 lines (8 loc) · 317 Bytes

damm-rs

"In error detection, the Damm algorithm is a check digit algorithm that detects all single-digit errors and all adjacent transposition errors." (Wikipedia)

example

use damm_rs::encode;

let number = "572";
assert_eq!(encode(number), Some(4));