To validate a ISO6346 compliant container number against the supplied check digit
Intent
Free Sunday afternoon - had an interesting problem at work with a flawed check digit validator.
After snooping around, noticed there was no fun implementation, either by way of translating letters through a key<>value map
or utilizing #indexOf( . This program does the translation programatically
Another reason being that I needed a new project in C and noticed an implementation did not exist, gave me an excuse to utilize the PCRE2 lib
Functionality
Reads from stdin and outputs to stdout if successful; otherwise, stderr