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 gtin14
Enums
Functions
?
Module
gtin_validate
::
gtin14
source
·
[
−
]
Expand description
Performs validation and correction of GTIN-14 codes.
Enums
FixError
Errors that make GTIN-14 correction impossible.
Functions
check
Check that a GTIN-14 code is valid by confirming that it is exactly 14 digits in length and that the check-digit is correct.
fix
Attempt to fix an invalid GTIN-14 code by stripping whitespace from the left and right sides and zero-padding the code if it is less than 14 digits in length.