iso639-1

Crates.ioiso639-1
lib.rsiso639-1
version0.4.1
sourcesrc
created_at2018-11-24 11:16:37.318614
updated_at2023-10-06 13:08:08.389975
descriptioniso639-1 enum and utils
homepagehttps://github.com/AlbanMinassian/iso639
repositoryhttps://github.com/AlbanMinassian/iso639
max_upload_size
id98413
size74,087
Alban Minassian (AlbanMinassian)

documentation

https://docs.rs/iso639-1

README

iso639-1

Build Status codecov License:MIT iso639-1 Latest Version

Usage

Cargo.toml

[dependencies]
iso639-1 = "0.4.1"

src/main.rs (gist)

extern crate iso639_1;
use iso639_1::{Iso639_1, from_iso639_1, to_iso639_3};

pub fn main() {
    assert!(Iso639_1::Fr != Iso639_1::En);
    assert!(from_iso639_1("fr").unwrap() == Iso639_1::Fr);
    assert!(to_iso639_3("fr").unwrap() == "fra");
}

Links

License

Copyright © 2018, Alban Minassian

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

The Software is provided “as is”, without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders X be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the Software. Except as contained in this notice, the name of the Alban Minassian shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the Alban Minassian.

Commit count: 50

cargo fmt