#mod #algorithm #in-place #luhn #10 #valid #numbers

luhnmod10

Fast and simple in-place implementation of the luhn (mod 10) algorithm

2 stable releases

Uses old Rust 2015

1.1.0 Aug 6, 2016
1.0.0 Aug 6, 2016

#7 in #luhn

Download history 1/week @ 2024-11-13 5/week @ 2024-11-20 12/week @ 2024-11-27 23/week @ 2024-12-04 38/week @ 2024-12-11 11/week @ 2024-12-18 9/week @ 2025-01-08 16/week @ 2025-01-15 9/week @ 2025-01-22 11/week @ 2025-01-29 31/week @ 2025-02-05 17/week @ 2025-02-12 6/week @ 2025-02-19 22/week @ 2025-02-26

79 downloads per month

MIT license

3KB

Luhn (Mod 10)

Build Status

A fast and simple in-place implementation of the luhn check algorithm in Rust. Implementations in other languages can be found at github.com/luhnmod10.

Usage

Add the crate to your Cargo.toml:

[dependencies]
luhnmod10 = "1.0.0"

Then:

extern crate luhnmod10;
luhnmod10::valid(number);

Contributing

Contributions are welcome! If you can improve the execution time of this implementation without increasing its complexity, please open a pull request. To test your change, run make in the repository to run the tests and the benchmarks.

No runtime deps