2 stable releases

1.0.1 Feb 20, 2024
1.0.0 Feb 26, 2023

#19 in #organization

MIT license

14KB
296 lines

Organisationsnummer

Crates.io Rust

Validate Swedish organization numbers with Rust. Follows version 1.1 of the specification.

Usage

use organisationsnummer::Organisationsnummer;

fn main() {
    match Organisationsnummer::new("202100-5489") {
        Ok(org) => println!("{}: {}", org.format().long(), org.valid()),
        Err(e) => panic!("Error: {}", e),
    }
}

Fore more details, see examples and/or run

$ cargo run --example organisationsnummer <organisationsnummer>

License

MIT

Dependencies

~3.5–9MB
~81K SLoC