Crates.io | unicode-locale-parser |
lib.rs | unicode-locale-parser |
version | 0.1.0 |
source | src |
created_at | 2024-01-09 01:25:06.406158 |
updated_at | 2024-01-09 01:25:06.406158 |
description | The parser for Unicode Locale Identifiers |
homepage | |
repository | https://github.com/kazupon/unicode-locale-parser |
max_upload_size | |
id | 1093193 |
size | 72,685 |
The parser for Unicode Locale Identifiers
All code implements of Unicode UTS #35 Language and Locale Identifiers.
use unicode_locale_parser::parse_locale_id;
fn main() {
// simple language
let locale = parse_locale_id("ja-JP");
println!("{:#?}", locale);
// language & unicode locale extension
let locale = parse_locale_id("de-Latn-DE-u-ca-buddhist");
println!("{:#?}", locale);
}
parse_locale_id
: parse unicode_locale_id
parse_language_id
: parse unicode_language_id
parse_subdivision_id
: parse unicode_subdivision_id
parse_measure_unit
: parse unicode_measure_unit
TinyStr
Eq
, Clone
, Default
, Hash
, PartialOrd
and Ord