luhn-rs
Validates strings and computes check digits using the Luhn algorithm.
Usage
Add luhn under [dependencies] in your Cargo.toml:
[]
= "1.0.1"
Use the validator!
valid; // true
Append check digits to your strings and make them Luhn-valid!
// A string which doesn't validate
let mut s = "11111111".to_string;
assert!;
// Let's fix that
s.push;
assert_eq!;
assert!;