pub fn county_by_fips_id(id: &str) -> Option<&'static str>
Expand description

Does not distinguish between “invalid” strings and simply incorrect ones; either way, you will only get None back.

use fips_codes::county_by_fips_id;
assert_eq!(county_by_fips_id("01000"), Some("Alabama"));
assert_eq!(county_by_fips_id("01002"), None);
assert_eq!(county_by_fips_id("01999"), None);
assert_eq!(county_by_fips_id("001000"), None);
assert_eq!(county_by_fips_id("abcde"), None);