id-card

Crates.ioid-card
lib.rsid-card
version0.1.3
sourcesrc
created_at2021-05-18 10:38:20.505652
updated_at2021-06-15 08:39:24.076478
descriptionChinese identification card number verification, including region code, birthday, and check code.
homepage
repositoryhttps://github.com/Ethan1225/id-card-rust.git
max_upload_size
id398933
size359,410
(Ethan1225)

documentation

README

id-card

Chinese identification card number verification, including region code, birthday, and check code.

License

APL 2.0, see LICENSE file.

Installation

In Cargo.toml add

[dependencies]
id-card="0.1"

Then re-run cargo build. That fetches the dependencies and builds the code.

Usage

extern crate id_card;

fn main() {
    println!("{}", id_card::validate("440524188001010014"));//outputs: true
}

Development

Test changes before commitment.(Install nightly if it haven't been installed: rustup install nightly)

cargo clean
cargo fmt --all -- --check
cargo build
cargo +nightly bench
cargo test

Commit count: 16

cargo fmt