Crates.io | normalize_country |
lib.rs | normalize_country |
version | 0.1.2 |
source | src |
created_at | 2022-06-21 11:47:07.532853 |
updated_at | 2022-08-19 11:07:24.180648 |
description | Convert country names and codes to a standard |
homepage | |
repository | https://github.com/andreytkachenko/normalize_country |
max_upload_size | |
id | 610178 |
size | 69,493 |
Convert country names and codes to a standard.
let cn = CountryNameNormalizer::new("./countries/en.toml").unwrap();
let st_kittis_nevis = cn.normalize_country("St. Kitts & Nevis").unwrap();
println!("{:?}", st_kittis_nevis)
//
// Country {
// aliases: Some(["Federation of Saint Christopher and Nevi"]),
// alpha2: "KN",
// alpha3: "KNA",
// fifa: "SKN",
// ioc: "SKN",
// iso_name: "Saint Kitts And Nevis",
// numeric: 659,
// official: "Federation of Saint Kitts and Nevis",
// short: "Saint Kitts And Nevis",
// emoji: "🇰🇳",
// shortcode: ":flag-kn:",
// }