mschorsch / damm-rs

An implementation of the Damm algorithm in Rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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));

About

An implementation of the Damm algorithm in Rust


Languages

Language:Rust 100.0%