Crate unicode_locale_parser

Source
Expand description

The parser for Unicode Locale Identifiers

§⛏️ Conformance

All code implements of Unicode UTS #35 Language and Locale Identifiers.

§🚀 Usages

use unicode_locale_parser::parse_locale_id;

// 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);

Structs§

Extensions
OtherExtensions
PuExtensions
TransformedExtensions
UnicodeLanguageIdentifier
UnicodeLocaleExtensions
UnicodeLocaleIdentifier
UnicodeMeasureUnit
UnicodeSubdivisionIdentifier

Enums§

ParserError
Enum representing the possible errors that can occur when parsing Unicode UTS #35 Language and Locale Identifiers.

Functions§

parse_language_id
Parse the given string as an Unicode Language Identifier.
parse_locale_id
Parse the given string as an Unicode Locale Identifier.
parse_measure_unit
Parse the given string as an Unicode Measure Unit
parse_subdivision_id
Parse the given string as an Unicode Subdivision Identifier.