|
ICU4X
International Components for Unicode
|
#include <Locale.d.hpp>
Public Member Functions | |
| std::unique_ptr< icu4x::Locale > | clone () const |
| std::string | basename () const |
| template<typename W> | |
| void | basename_write (W &writeable_output) const |
| std::optional< std::string > | get_unicode_extension (std::string_view s) const |
| template<typename W> | |
| std::optional< std::monostate > | get_unicode_extension_write (std::string_view s, W &writeable_output) const |
| std::optional< std::monostate > | set_unicode_extension (std::string_view k, std::string_view v) |
| std::string | language () const |
| template<typename W> | |
| void | language_write (W &writeable_output) const |
| icu4x::diplomat::result< std::monostate, icu4x::LocaleParseError > | set_language (std::string_view s) |
| std::optional< std::string > | region () const |
| template<typename W> | |
| std::optional< std::monostate > | region_write (W &writeable_output) const |
| icu4x::diplomat::result< std::monostate, icu4x::LocaleParseError > | set_region (std::string_view s) |
| std::optional< std::string > | script () const |
| template<typename W> | |
| std::optional< std::monostate > | script_write (W &writeable_output) const |
| icu4x::diplomat::result< std::monostate, icu4x::LocaleParseError > | set_script (std::string_view s) |
| std::string | variants () const |
| template<typename W> | |
| void | variants_write (W &writeable_output) const |
| size_t | variant_count () const |
| std::optional< std::string > | variant_at (size_t index) const |
| template<typename W> | |
| std::optional< std::monostate > | variant_at_write (size_t index, W &writeable_output) const |
| bool | has_variant (std::string_view s) const |
| icu4x::diplomat::result< bool, icu4x::LocaleParseError > | add_variant (std::string_view s) |
| bool | remove_variant (std::string_view s) |
| void | clear_variants () |
| std::string | to_string () const |
| template<typename W> | |
| void | to_string_write (W &writeable_output) const |
| bool | normalizing_eq (std::string_view other) const |
| int8_t | compare_to_string (std::string_view other) const |
| int8_t | compare_to (const icu4x::Locale &other) const |
| bool | operator== (const icu4x::Locale &other) const |
| bool | operator!= (const icu4x::Locale &other) const |
| bool | operator<= (const icu4x::Locale &other) const |
| bool | operator>= (const icu4x::Locale &other) const |
| bool | operator< (const icu4x::Locale &other) const |
| bool | operator> (const icu4x::Locale &other) const |
Static Public Member Functions | |
| static icu4x::diplomat::result< std::unique_ptr< icu4x::Locale >, icu4x::LocaleParseError > | from_string (std::string_view name) |
| static std::unique_ptr< icu4x::Locale > | unknown () |
| static const icu4x::Locale & | unknown_ref () |
| static icu4x::diplomat::result< std::string, icu4x::LocaleParseError > | normalize (std::string_view s) |
| template<typename W> | |
| static icu4x::diplomat::result< std::monostate, icu4x::LocaleParseError > | normalize_write (std::string_view s, W &writeable_output) |
| static void | operator delete (void *ptr) |
An ICU4X Locale, capable of representing strings like "en-US".
See the Rust documentation for Locale for more information.
|
inline |
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.
|
inline |
Returns a string representation of the LanguageIdentifier part of Locale.
See the Rust documentation for id for more information.
|
inline |
|
inline |
Clears all variants from the Locale.
See the Rust documentation for clear for more information.
|
inline |
Clones the Locale.
See the Rust documentation for Locale for more information.
|
inline |
See the Rust documentation for total_cmp for more information.
|
inline |
See the Rust documentation for strict_cmp for more information.
|
inlinestatic |
Construct 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.
|
inline |
Returns a string representation of the unicode extension.
See the Rust documentation for extensions for more information.
|
inline |
|
inline |
Returns whether the Locale has a specific variant.
See the Rust documentation for Variants for more information.
|
inline |
Returns a string representation of Locale language.
See the Rust documentation for id for more information.
|
inline |
|
inlinestatic |
Normalizes a locale string.
See the Rust documentation for normalize for more information.
|
inlinestatic |
|
inline |
See the Rust documentation for normalizing_eq for more information.
|
inlinestatic |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Returns a string representation of Locale region.
See the Rust documentation for id for more information.
|
inline |
|
inline |
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.
|
inline |
Returns a string representation of Locale script.
See the Rust documentation for id for more information.
|
inline |
|
inline |
Set the language part of the Locale.
See the Rust documentation for try_from_str for more information.
|
inline |
Set the region part of the Locale.
See the Rust documentation for try_from_str for more information.
|
inline |
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.
|
inline |
Set a Unicode extension.
See the Rust documentation for extensions for more information.
|
inline |
Returns a string representation of Locale.
See the Rust documentation for write_to for more information.
|
inline |
|
inlinestatic |
Construct a unknown Locale "und".
See the Rust documentation for UNKNOWN for more information.
|
inlinestatic |
Returns a borrowed unknown ("und") Locale, without allocating.
See the Rust documentation for UNKNOWN for more information.
|
inline |
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.
|
inline |
|
inline |
Returns the number of variants in this Locale.
See the Rust documentation for Variants for more information.
|
inline |
Returns a string representation of the Locale variants.
See the Rust documentation for Variants for more information.
|
inline |