5 releases

0.1.0-beta.3 Oct 19, 2024
0.1.0-beta.2 May 16, 2024
0.1.0-beta.1 Apr 21, 2024
0.1.0-alpha.3 Feb 2, 2024
0.1.0-alpha.2 Jan 27, 2024

#106 in Geospatial

Download history 4/week @ 2024-09-10 3/week @ 2024-09-17 11/week @ 2024-09-24 2/week @ 2024-10-01 6/week @ 2024-10-08 175/week @ 2024-10-15 70/week @ 2024-10-22 106/week @ 2024-10-29 83/week @ 2024-11-05 162/week @ 2024-11-12

430 downloads per month
Used in japanese-address-parser

MIT license

20KB
456 lines

jisx0401

Docs Crates.io (latest)

JIS X 0401により定義された都道府県コードを取り扱うためのユーティリティです

Example

use jisx0401::Prefecture;

fn main() {
    let prefecture = Prefecture::try_from("26").unwrap();
    assert_eq!(prefecture, Prefecture::KYOTO);
    assert_eq!(prefecture.name_ja(), "京都府");

    let prefecture = Prefecture::try_from("滋賀県").unwrap();
    assert_eq!(prefecture, Prefecture::SHIGA);
    assert_eq!(prefecture.code(), "25");
}

No runtime deps