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

#include <ICU4XCaseMapper.hpp>

Public Member Functions

template<typename W>
diplomat::result< std::monostate, ICU4XErrorlowercase_to_writeable (const std::string_view s, const ICU4XLocale &locale, W &write) const
 
diplomat::result< std::string, ICU4XErrorlowercase (const std::string_view s, const ICU4XLocale &locale) const
 
template<typename W>
diplomat::result< std::monostate, ICU4XErroruppercase_to_writeable (const std::string_view s, const ICU4XLocale &locale, W &write) const
 
diplomat::result< std::string, ICU4XErroruppercase (const std::string_view s, const ICU4XLocale &locale) const
 
template<typename W>
diplomat::result< std::monostate, ICU4XErrortitlecase_segment_with_only_case_data_v1_to_writeable (const std::string_view s, const ICU4XLocale &locale, ICU4XTitlecaseOptionsV1 options, W &write) const
 
diplomat::result< std::string, ICU4XErrortitlecase_segment_with_only_case_data_v1 (const std::string_view s, const ICU4XLocale &locale, ICU4XTitlecaseOptionsV1 options) const
 
template<typename W>
diplomat::result< std::monostate, ICU4XErrorfold_to_writeable (const std::string_view s, W &write) const
 
diplomat::result< std::string, ICU4XErrorfold (const std::string_view s) const
 
template<typename W>
diplomat::result< std::monostate, ICU4XErrorfold_turkic_to_writeable (const std::string_view s, W &write) const
 
diplomat::result< std::string, ICU4XErrorfold_turkic (const std::string_view s) const
 
void add_case_closure_to (char32_t c, ICU4XCodePointSetBuilder &builder) const
 
char32_t simple_lowercase (char32_t ch) const
 
char32_t simple_uppercase (char32_t ch) const
 
char32_t simple_titlecase (char32_t ch) const
 
char32_t simple_fold (char32_t ch) const
 
char32_t simple_fold_turkic (char32_t ch) const
 
 ICU4XCaseMapper (capi::ICU4XCaseMapper *i)
 
 ICU4XCaseMapper ()=default
 
 ICU4XCaseMapper (ICU4XCaseMapper &&) noexcept=default
 
ICU4XCaseMapperoperator= (ICU4XCaseMapper &&other) noexcept=default
 

Static Public Member Functions

static diplomat::result< ICU4XCaseMapper, ICU4XErrorcreate (const ICU4XDataProvider &provider)
 

Detailed Description

See the Rust documentation for CaseMapper for more information.

Constructor & Destructor Documentation

◆ ICU4XCaseMapper() [1/3]

ICU4XCaseMapper::ICU4XCaseMapper ( capi::ICU4XCaseMapper * i)
inlineexplicit

◆ ICU4XCaseMapper() [2/3]

ICU4XCaseMapper::ICU4XCaseMapper ( )
default

◆ ICU4XCaseMapper() [3/3]

ICU4XCaseMapper::ICU4XCaseMapper ( ICU4XCaseMapper && )
defaultnoexcept

Member Function Documentation

◆ add_case_closure_to()

void ICU4XCaseMapper::add_case_closure_to ( char32_t c,
ICU4XCodePointSetBuilder & builder ) const
inline

Adds all simple case mappings and the full case folding for c to builder. Also adds special case closure mappings.

In other words, this adds all characters that this casemaps to, as well as all characters that may casemap to this one.

Note that since ICU4XCodePointSetBuilder does not contain strings, this will ignore string mappings.

Identical to the similarly named method on ICU4XCaseMapCloser, use that if you plan on using string case closure mappings too.

See the Rust documentation for add_case_closure_to for more information.

◆ create()

diplomat::result< ICU4XCaseMapper, ICU4XError > ICU4XCaseMapper::create ( const ICU4XDataProvider & provider)
inlinestatic

Construct a new ICU4XCaseMapper instance

See the Rust documentation for new for more information.

◆ fold()

diplomat::result< std::string, ICU4XError > ICU4XCaseMapper::fold ( const std::string_view s) const
inline

Case-folds the characters in the given string

See the Rust documentation for fold for more information.

◆ fold_to_writeable()

template<typename W>
diplomat::result< std::monostate, ICU4XError > ICU4XCaseMapper::fold_to_writeable ( const std::string_view s,
W & write ) const
inline

Case-folds the characters in the given string

See the Rust documentation for fold for more information.

◆ fold_turkic()

diplomat::result< std::string, ICU4XError > ICU4XCaseMapper::fold_turkic ( const std::string_view s) const
inline

Case-folds the characters in the given string using Turkic (T) mappings for dotted/dotless I.

See the Rust documentation for fold_turkic for more information.

◆ fold_turkic_to_writeable()

template<typename W>
diplomat::result< std::monostate, ICU4XError > ICU4XCaseMapper::fold_turkic_to_writeable ( const std::string_view s,
W & write ) const
inline

Case-folds the characters in the given string using Turkic (T) mappings for dotted/dotless I.

See the Rust documentation for fold_turkic for more information.

◆ lowercase()

diplomat::result< std::string, ICU4XError > ICU4XCaseMapper::lowercase ( const std::string_view s,
const ICU4XLocale & locale ) const
inline

Returns the full lowercase mapping of the given string

See the Rust documentation for lowercase for more information.

◆ lowercase_to_writeable()

template<typename W>
diplomat::result< std::monostate, ICU4XError > ICU4XCaseMapper::lowercase_to_writeable ( const std::string_view s,
const ICU4XLocale & locale,
W & write ) const
inline

Returns the full lowercase mapping of the given string

See the Rust documentation for lowercase for more information.

◆ operator=()

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

◆ simple_fold()

char32_t ICU4XCaseMapper::simple_fold ( char32_t ch) const
inline

Returns the simple casefolding of the given character.

This function only implements simple folding. For full folding, use ICU4XCaseMapper::fold.

See the Rust documentation for simple_fold for more information.

◆ simple_fold_turkic()

char32_t ICU4XCaseMapper::simple_fold_turkic ( char32_t ch) const
inline

Returns the simple casefolding of the given character in the Turkic locale

This function only implements simple folding. For full folding, use ICU4XCaseMapper::fold_turkic.

See the Rust documentation for simple_fold_turkic for more information.

◆ simple_lowercase()

char32_t ICU4XCaseMapper::simple_lowercase ( char32_t ch) const
inline

Returns the simple lowercase mapping of the given character.

This function only implements simple and common mappings. Full mappings, which can map one char to a string, are not included. For full mappings, use ICU4XCaseMapper::lowercase.

See the Rust documentation for simple_lowercase for more information.

◆ simple_titlecase()

char32_t ICU4XCaseMapper::simple_titlecase ( char32_t ch) const
inline

Returns the simple titlecase mapping of the given character.

This function only implements simple and common mappings. Full mappings, which can map one char to a string, are not included. For full mappings, use ICU4XCaseMapper::titlecase_segment.

See the Rust documentation for simple_titlecase for more information.

◆ simple_uppercase()

char32_t ICU4XCaseMapper::simple_uppercase ( char32_t ch) const
inline

Returns the simple uppercase mapping of the given character.

This function only implements simple and common mappings. Full mappings, which can map one char to a string, are not included. For full mappings, use ICU4XCaseMapper::uppercase.

See the Rust documentation for simple_uppercase for more information.

◆ titlecase_segment_with_only_case_data_v1()

diplomat::result< std::string, ICU4XError > ICU4XCaseMapper::titlecase_segment_with_only_case_data_v1 ( const std::string_view s,
const ICU4XLocale & locale,
ICU4XTitlecaseOptionsV1 options ) const
inline

Returns the full titlecase mapping of the given string, performing head adjustment without loading additional data. (if head adjustment is enabled in the options)

The v1 refers to the version of the options struct, which may change as we add more options

See the Rust documentation for titlecase_segment_with_only_case_data for more information.

◆ titlecase_segment_with_only_case_data_v1_to_writeable()

template<typename W>
diplomat::result< std::monostate, ICU4XError > ICU4XCaseMapper::titlecase_segment_with_only_case_data_v1_to_writeable ( const std::string_view s,
const ICU4XLocale & locale,
ICU4XTitlecaseOptionsV1 options,
W & write ) const
inline

Returns the full titlecase mapping of the given string, performing head adjustment without loading additional data. (if head adjustment is enabled in the options)

The v1 refers to the version of the options struct, which may change as we add more options

See the Rust documentation for titlecase_segment_with_only_case_data for more information.

◆ uppercase()

diplomat::result< std::string, ICU4XError > ICU4XCaseMapper::uppercase ( const std::string_view s,
const ICU4XLocale & locale ) const
inline

Returns the full uppercase mapping of the given string

See the Rust documentation for uppercase for more information.

◆ uppercase_to_writeable()

template<typename W>
diplomat::result< std::monostate, ICU4XError > ICU4XCaseMapper::uppercase_to_writeable ( const std::string_view s,
const ICU4XLocale & locale,
W & write ) const
inline

Returns the full uppercase mapping of the given string

See the Rust documentation for uppercase for more information.


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