| Crates.io | tw-id-num |
| lib.rs | tw-id-num |
| version | 0.1.2 |
| created_at | 2022-11-06 07:42:33.116557+00 |
| updated_at | 2023-04-17 08:05:40.705468+00 |
| description | Check or generate Taiwan ID numbers. |
| homepage | https://magiclen.org/tw-id-num |
| repository | https://github.com/magiclen/rust-tw-id-num |
| max_upload_size | |
| id | 706377 |
| size | 11,354 |
Check or generate Taiwan ID numbers.
檢查或是產生中華民國國民身分證統一編號(即身份證字號,而非營業人統一編號),支援新式外來人口統一證號。
let id = tw_id_num::generate_national(Some(tw_id_num::Sex::Male)); // e.g. "A123456789"
assert!(tw_id_num::check(&id));
assert!(tw_id_num::check_national(&id));
assert!(!tw_id_num::check_resident(&id));
generate FeatureThis crate can be compiled without std.
In few cases, you may want to generate IDs by yourself. The generate* functions are available if the generate feature is enabled. But the feature needs std.
[dependencies.tw-id-num]
version = "*"
features = ["generate"]
https://crates.io/crates/tw-id-num