jp-prefecture
jp-prefecture is an utility library for handling Japanese prefectures.
Getting Started
Crate has to be added as dependency to Cargo.toml
[]
= "3.1.0"
and imported to the scope of a block where it's begin called
use prefectures;
Examples
use prefectures;
let tokyo = find_by_kanji;
println!; // => Ok(Prefecture::Tokyo)
println!; // => "東京都"
println!; // => "東京"
println!; // => "Tokyo"
let tokyo = find_by_kanji; // uhmmmm...
println!; // => Err(Error::InvalidPrefectureName("東京県"))