#luhn #algorithm

checkluhn

Validate the Luhn algorithm for the given string

1 unstable release

0.0.1 Mar 26, 2021

#10 in #luhn


Used in validaten

Custom license

4KB

Check Luhn

Build Status

Validate the Luhn algorithm for the given string.

Requirements

  • Rust 1.40+

Usage

[dependencies]
checkluhn = "0.0.1"

and

use checkluhn;

fn main() {
    let n = "4111111111111111";
    assert!(checkluhn::validate(n));
}

LICENSE: MIT

No runtime deps