Function iso639_1::to_iso639_3

source ·
pub fn to_iso639_3(language: &str) -> Result<&str, Iso639v1Error>
Expand description

get iso639-3 string (3 chars) switch iso639-1 string (2 chars) - or error Iso639v1Error

Examples

extern crate iso639_1;
use iso639_1::to_iso639_3;
fn main() {
    let lang = to_iso639_3("fr").unwrap();
    assert!(lang == "fra");
}