Docs.rs
gtin-validate-1.2.0
gtin-validate 1.2.0
Docs.rs crate page
MIT/Apache-2.0
Links
Repository
Crates.io
Source
Owners
austinhartzheim
Dependencies
criterion ^0.2
dev
proptest ^0.7
dev
Versions
100%
of the crate is documented
Go to latest version
Platform
i686-pc-windows-msvc
i686-unknown-linux-gnu
x86_64-apple-darwin
x86_64-pc-windows-msvc
x86_64-unknown-linux-gnu
Feature flags
Rust
About docs.rs
Privacy policy
Rust website
The Book
Standard Library API Reference
Rust by Example
The Cargo Guide
Clippy Documentation
☰
Module gtin12
Enums
Functions
?
Module
gtin_validate
::
gtin12
source
·
[
−
]
Expand description
Performs validation and correction of GTIN-12 and UPC-A codes.
Enums
FixError
Errors that make GTIN-12 correction impossible.
Functions
check
Check that a UPC-A code is valid by confirming that it is made of exactly 12 digits and that the check-digit is correct.
fix
Attempt to fix invalid UPC codes by stripping whitespace from the left and right sides and zero-padding the UPC if it is less than 12 digits in length.