Locale class final

An ICU4X Locale, capable of representing strings like "en-US".

See the Rust documentation for Locale for more information.

Implemented types

Constructors

Locale.fromString(String name)
Construct an Locale from an locale identifier.
factory
Locale.unknown()
Construct a unknown Locale "und".
factory

Properties

basename String
Returns a string representation of the LanguageIdentifier part of Locale.
no setter
hashCode int
The hash code for this object.
no setteroverride
language String
Returns a string representation of Locale language.
getter/setter pair
region String?
Returns a string representation of Locale region.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
script String?
Returns a string representation of Locale script.
no setter

Methods

clone() Locale
Clones the Locale.
compareTo(Locale other) int
See the Rust documentation for total_cmp for more information.
override
compareToString(String other) int
See the Rust documentation for strict_cmp for more information.
getUnicodeExtension(String s) String?
Returns a string representation of the unicode extension.
normalizingEq(String other) bool
See the Rust documentation for normalizing_eq for more information.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setRegion(String s) → void
Set the region part of the Locale.
setScript(String s) → void
Set the script part of the Locale. Pass an empty string to remove the script.
toString() String
Returns a string representation of Locale.
override

Operators

operator ==(Object other) bool
The equality operator.
override

Static Methods

normalize(String s) String
Normalizes a locale string.