ICU4X
International Components for Unicode
|
#include <ICU4XLocale.hpp>
Public Member Functions | |
ICU4XLocale | clone () const |
template<typename W > | |
diplomat::result< std::monostate, ICU4XError > | basename_to_writeable (W &write) const |
diplomat::result< std::string, ICU4XError > | basename () const |
template<typename W > | |
diplomat::result< std::monostate, ICU4XError > | get_unicode_extension_to_writeable (const std::string_view bytes, W &write) const |
diplomat::result< std::string, ICU4XError > | get_unicode_extension (const std::string_view bytes) const |
template<typename W > | |
diplomat::result< std::monostate, ICU4XError > | language_to_writeable (W &write) const |
diplomat::result< std::string, ICU4XError > | language () const |
diplomat::result< std::monostate, ICU4XError > | set_language (const std::string_view bytes) |
template<typename W > | |
diplomat::result< std::monostate, ICU4XError > | region_to_writeable (W &write) const |
diplomat::result< std::string, ICU4XError > | region () const |
diplomat::result< std::monostate, ICU4XError > | set_region (const std::string_view bytes) |
template<typename W > | |
diplomat::result< std::monostate, ICU4XError > | script_to_writeable (W &write) const |
diplomat::result< std::string, ICU4XError > | script () const |
diplomat::result< std::monostate, ICU4XError > | set_script (const std::string_view bytes) |
template<typename W > | |
diplomat::result< std::monostate, ICU4XError > | to_string_to_writeable (W &write) const |
diplomat::result< std::string, ICU4XError > | to_string () const |
bool | normalizing_eq (const std::string_view other) const |
ICU4XOrdering | strict_cmp (const std::string_view other) const |
ICU4XOrdering | total_cmp (const ICU4XLocale &other) const |
ICU4XLocale (capi::ICU4XLocale *i) | |
ICU4XLocale ()=default | |
ICU4XLocale (ICU4XLocale &&) noexcept=default | |
ICU4XLocale & | operator= (ICU4XLocale &&other) noexcept=default |
Static Public Member Functions | |
static diplomat::result< ICU4XLocale, ICU4XError > | create_from_string (const std::string_view name) |
static ICU4XLocale | create_und () |
template<typename W > | |
static diplomat::result< std::monostate, ICU4XError > | canonicalize_to_writeable (const std::string_view bytes, W &write) |
static diplomat::result< std::string, ICU4XError > | canonicalize (const std::string_view bytes) |
static ICU4XLocale | create_en () |
static ICU4XLocale | create_bn () |
An ICU4X Locale, capable of representing strings like "en-US"
.
See the Rust documentation for Locale
for more information.
|
inlineexplicit |
|
default |
|
defaultnoexcept |
|
inline |
Write a string representation of the LanguageIdentifier
part of [ICU4XLocale
] to write
.
See the Rust documentation for id
for more information.
|
inline |
Write a string representation of the LanguageIdentifier
part of [ICU4XLocale
] to write
.
See the Rust documentation for id
for more information.
|
inlinestatic |
Best effort locale canonicalizer that doesn't need any data
Use ICU4XLocaleCanonicalizer for better control and functionality
See the Rust documentation for canonicalize
for more information.
|
inlinestatic |
Best effort locale canonicalizer that doesn't need any data
Use ICU4XLocaleCanonicalizer for better control and functionality
See the Rust documentation for canonicalize
for more information.
|
inline |
Clones the [ICU4XLocale
].
See the Rust documentation for Locale
for more information.
|
inlinestatic |
Deprecated
Use `create_from_string("bn").
|
inlinestatic |
Deprecated
Use `create_from_string("en").
|
inlinestatic |
Construct an [ICU4XLocale
] 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_bytes
for more information.
|
inlinestatic |
Construct a default undefined [ICU4XLocale
] "und".
See the Rust documentation for UND
for more information.
|
inline |
Write a string representation of the unicode extension to write
See the Rust documentation for extensions
for more information.
|
inline |
Write a string representation of the unicode extension to write
See the Rust documentation for extensions
for more information.
|
inline |
Write a string representation of [ICU4XLocale
] language to write
See the Rust documentation for id
for more information.
|
inline |
Write a string representation of [ICU4XLocale
] language to write
See the Rust documentation for id
for more information.
|
inline |
See the Rust documentation for normalizing_eq
for more information.
|
defaultnoexcept |
|
inline |
Write a string representation of [ICU4XLocale
] region to write
See the Rust documentation for id
for more information.
|
inline |
Write a string representation of [ICU4XLocale
] region to write
See the Rust documentation for id
for more information.
|
inline |
Write a string representation of [ICU4XLocale
] script to write
See the Rust documentation for id
for more information.
|
inline |
Write a string representation of [ICU4XLocale
] script to write
See the Rust documentation for id
for more information.
|
inline |
Set the language part of the [ICU4XLocale
].
See the Rust documentation for try_from_bytes
for more information.
|
inline |
Set the region part of the [ICU4XLocale
].
See the Rust documentation for try_from_bytes
for more information.
|
inline |
Set the script part of the [ICU4XLocale
]. Pass an empty string to remove the script.
See the Rust documentation for try_from_bytes
for more information.
|
inline |
See the Rust documentation for strict_cmp
for more information.
|
inline |
Write a string representation of [ICU4XLocale
] to write
See the Rust documentation for write_to
for more information.
|
inline |
Write a string representation of [ICU4XLocale
] to write
See the Rust documentation for write_to
for more information.
|
inline |
See the Rust documentation for total_cmp
for more information.