Validate Swedish organization numbers with Rust. Follows version 1.1 of the specification.
$ cargo add organisationsnummeruse organisationsnummer::Organisationsnummer;
fn main() {
match Organisationsnummer::new("202100-5489") {
Ok(org) => println!("{}: {}", org.format().long(), org.valid()),
Err(e) => panic!("Error: {}", e),
}
}For more details, see examples and/or run
$ cargo run --example organisationsnummer <organisationsnummer>Fredrik "Frozzare" Forsmo (1991-2026) was the initiator, co-founder and a core contributor of the organisationsnummer project. This library carries his work. He is missed.
MIT