2 stable releases

1.0.1 Feb 20, 2024
1.0.0 Feb 26, 2023

#1 in #swedish

Download history 92/week @ 2024-02-19 62/week @ 2024-02-26 1/week @ 2024-03-04 17/week @ 2024-03-11 40/week @ 2024-04-01

57 downloads per month

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–10MB
~81K SLoC