7 releases

0.1.1 Dec 21, 2024
0.1.0 Dec 15, 2024
0.1.0-beta.3 Oct 19, 2024
0.1.0-beta.2 May 16, 2024
0.1.0-alpha.2 Jan 27, 2024

#94 in Internationalization (i18n)

Download history 6/week @ 2024-09-18 8/week @ 2024-09-25 3/week @ 2024-10-02 5/week @ 2024-10-09 181/week @ 2024-10-16 84/week @ 2024-10-23 108/week @ 2024-10-30 63/week @ 2024-11-06 173/week @ 2024-11-13 24/week @ 2024-11-20 82/week @ 2024-11-27 130/week @ 2024-12-04 204/week @ 2024-12-11 123/week @ 2024-12-18 89/week @ 2024-12-25 55/week @ 2025-01-01

484 downloads per month
Used in japanese-address-parser

MIT license

13KB
225 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