Returns a string representation of the LanguageIdentifier part of
Locale.
See the Rust documentation for id for more information.
Returns a string representation of Locale language.
See the Rust documentation for id for more information.
Set the language part of the Locale.
See the Rust documentation for try_from_str for more information.
Returns a string representation of Locale region.
See the Rust documentation for id for more information.
Set the region part of the Locale.
See the Rust documentation for try_from_str for more information.
Returns a string representation of Locale script.
See the Rust documentation for id for more information.
Set the script part of the Locale. Pass an empty string to remove the script.
See the Rust documentation for try_from_str for more information.
Returns the number of variants in this Locale.
See the Rust documentation for Variants for more information.
StaticfromConstruct an Locale from an locale identifier.
This will run the complete locale parsing algorithm. If code size and
performance are critical and the locale is of a known shape (such as
aa-BB) use create_und, set_language, set_script, and set_region.
See the Rust documentation for try_from_str for more information.
StaticnormalizeNormalizes a locale string.
See the Rust documentation for normalize for more information.
StaticunknownConstruct a unknown Locale "und".
See the Rust documentation for UNKNOWN for more information.
Adds a variant to the Locale.
Returns an error if the variant string is invalid.
Returns true if the variant was added, false if already present.
See the Rust documentation for push for more information.
Clears all variants from the Locale.
See the Rust documentation for clear for more information.
Clones the Locale.
See the Rust documentation for Locale for more information.
See the Rust documentation for total_cmp for more information.
See the Rust documentation for strict_cmp for more information.
Returns a string representation of the unicode extension.
See the Rust documentation for extensions for more information.
Returns whether the Locale has a specific variant.
See the Rust documentation for Variants for more information.
See the Rust documentation for normalizing_eq for more information.
Removes a variant from the Locale.
Returns true if the variant was removed, false if not present.
Returns false for invalid variant strings (they cannot exist in the locale).
See the Rust documentation for remove for more information.
Set a Unicode extension.
See the Rust documentation for extensions for more information.
Returns a string representation of Locale.
See the Rust documentation for write_to for more information.
Returns the variant at the given index, or nothing if the index is out of bounds.
See the Rust documentation for Variants for more information.
Returns a string representation of the Locale variants.
See the Rust documentation for Variants for more information.
An ICU4X Locale, capable of representing strings like
"en-US".See the Rust documentation for
Localefor more information.