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

#107 in Geospatial

Download history 6/week @ 2024-09-14 9/week @ 2024-09-21 3/week @ 2024-09-28 6/week @ 2024-10-05 2/week @ 2024-10-12 194/week @ 2024-10-19 91/week @ 2024-10-26 124/week @ 2024-11-02 58/week @ 2024-11-09 149/week @ 2024-11-16 20/week @ 2024-11-23 144/week @ 2024-11-30

380 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