ICU4X
International Components for Unicode
Loading...
Searching...
No Matches
ICU4XCollator Class Reference

#include <ICU4XCollator.hpp>

Public Member Functions

ICU4XOrdering compare (const std::string_view left, const std::string_view right) const
 
ICU4XOrdering compare_valid_utf8 (const std::string_view left, const std::string_view right) const
 
ICU4XOrdering compare_utf16 (const std::u16string_view left, const std::u16string_view right) const
 
ICU4XCollatorResolvedOptionsV1 resolved_options () const
 
 ICU4XCollator (capi::ICU4XCollator *i)
 
 ICU4XCollator ()=default
 
 ICU4XCollator (ICU4XCollator &&) noexcept=default
 
ICU4XCollatoroperator= (ICU4XCollator &&other) noexcept=default
 

Static Public Member Functions

static diplomat::result< ICU4XCollator, ICU4XErrorcreate_v1 (const ICU4XDataProvider &provider, const ICU4XLocale &locale, ICU4XCollatorOptionsV1 options)
 

Detailed Description

See the Rust documentation for Collator for more information.

Constructor & Destructor Documentation

◆ ICU4XCollator() [1/3]

ICU4XCollator::ICU4XCollator ( capi::ICU4XCollator * i)
inlineexplicit

◆ ICU4XCollator() [2/3]

ICU4XCollator::ICU4XCollator ( )
default

◆ ICU4XCollator() [3/3]

ICU4XCollator::ICU4XCollator ( ICU4XCollator && )
defaultnoexcept

Member Function Documentation

◆ compare()

ICU4XOrdering ICU4XCollator::compare ( const std::string_view left,
const std::string_view right ) const
inline

Compare two strings.

Ill-formed input is treated as if errors had been replaced with REPLACEMENT CHARACTERs according to the WHATWG Encoding Standard.

See the Rust documentation for compare_utf8 for more information.

◆ compare_utf16()

ICU4XOrdering ICU4XCollator::compare_utf16 ( const std::u16string_view left,
const std::u16string_view right ) const
inline

Compare two strings.

Ill-formed input is treated as if errors had been replaced with REPLACEMENT CHARACTERs according to the WHATWG Encoding Standard.

See the Rust documentation for compare_utf16 for more information.

◆ compare_valid_utf8()

ICU4XOrdering ICU4XCollator::compare_valid_utf8 ( const std::string_view left,
const std::string_view right ) const
inline

Compare two strings.

See the Rust documentation for compare for more information.

Warning: Passing ill-formed UTF-8 is undefined behavior (and may be memory-unsafe).

◆ create_v1()

diplomat::result< ICU4XCollator, ICU4XError > ICU4XCollator::create_v1 ( const ICU4XDataProvider & provider,
const ICU4XLocale & locale,
ICU4XCollatorOptionsV1 options )
inlinestatic

Construct a new Collator instance.

See the Rust documentation for try_new for more information.

◆ operator=()

ICU4XCollator & ICU4XCollator::operator= ( ICU4XCollator && other)
defaultnoexcept

◆ resolved_options()

ICU4XCollatorResolvedOptionsV1 ICU4XCollator::resolved_options ( ) const
inline

The resolved options showing how the default options, the requested options, and the options from locale data were combined. None of the struct fields will have Auto as the value.

See the Rust documentation for resolved_options for more information.


The documentation for this class was generated from the following file: