organisationsnummer

Crates.ioorganisationsnummer
lib.rsorganisationsnummer
version1.0.1
sourcesrc
created_at2023-02-26 17:14:28.512802
updated_at2024-02-20 21:03:55.495047
descriptionValidate Swedish organization numbers
homepagehttps://organisationsnummer.dev
repositoryhttps://github.com/organisationsnummer/rust
max_upload_size
id795334
size48,040
Fredrik Forsmo (frozzare)

documentation

README

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

Commit count: 7

cargo fmt