1#ifndef ICU4X_CaseMapper_HPP
2#define ICU4X_CaseMapper_HPP
26 icu4x::capi::CaseMapper* icu4x_CaseMapper_create_mv1(
void);
28 typedef struct icu4x_CaseMapper_create_with_provider_mv1_result {
union {icu4x::capi::CaseMapper* ok; icu4x::capi::DataError err;};
bool is_ok;} icu4x_CaseMapper_create_with_provider_mv1_result;
29 icu4x_CaseMapper_create_with_provider_mv1_result icu4x_CaseMapper_create_with_provider_mv1(
const icu4x::capi::DataProvider* provider);
31 void icu4x_CaseMapper_lowercase_mv1(
const icu4x::capi::CaseMapper* self, icu4x::diplomat::capi::DiplomatStringView s,
const icu4x::capi::Locale* locale, icu4x::diplomat::capi::DiplomatWrite* write);
33 void icu4x_CaseMapper_uppercase_mv1(
const icu4x::capi::CaseMapper* self, icu4x::diplomat::capi::DiplomatStringView s,
const icu4x::capi::Locale* locale, icu4x::diplomat::capi::DiplomatWrite* write);
35 void icu4x_CaseMapper_lowercase_with_compiled_data_mv1(icu4x::diplomat::capi::DiplomatStringView s,
const icu4x::capi::Locale* locale, icu4x::diplomat::capi::DiplomatWrite* write);
37 void icu4x_CaseMapper_uppercase_with_compiled_data_mv1(icu4x::diplomat::capi::DiplomatStringView s,
const icu4x::capi::Locale* locale, icu4x::diplomat::capi::DiplomatWrite* write);
39 void icu4x_CaseMapper_titlecase_segment_with_only_case_data_v1_mv1(
const icu4x::capi::CaseMapper* self, icu4x::diplomat::capi::DiplomatStringView s,
const icu4x::capi::Locale* locale, icu4x::capi::TitlecaseOptionsV1 options, icu4x::diplomat::capi::DiplomatWrite* write);
41 void icu4x_CaseMapper_titlecase_segment_with_only_case_compiled_data_v1_mv1(icu4x::diplomat::capi::DiplomatStringView s,
const icu4x::capi::Locale* locale, icu4x::capi::TitlecaseOptionsV1 options, icu4x::diplomat::capi::DiplomatWrite* write);
43 void icu4x_CaseMapper_fold_mv1(
const icu4x::capi::CaseMapper* self, icu4x::diplomat::capi::DiplomatStringView s, icu4x::diplomat::capi::DiplomatWrite* write);
45 void icu4x_CaseMapper_fold_turkic_mv1(
const icu4x::capi::CaseMapper* self, icu4x::diplomat::capi::DiplomatStringView s, icu4x::diplomat::capi::DiplomatWrite* write);
47 void icu4x_CaseMapper_add_case_closure_to_mv1(
const icu4x::capi::CaseMapper* self,
char32_t c, icu4x::capi::CodePointSetBuilder* builder);
49 char32_t icu4x_CaseMapper_simple_lowercase_mv1(
const icu4x::capi::CaseMapper* self,
char32_t ch);
51 char32_t icu4x_CaseMapper_simple_lowercase_with_compiled_data_mv1(
char32_t ch);
53 char32_t icu4x_CaseMapper_simple_uppercase_mv1(
const icu4x::capi::CaseMapper* self,
char32_t ch);
55 char32_t icu4x_CaseMapper_simple_uppercase_with_compiled_data_mv1(
char32_t ch);
57 char32_t icu4x_CaseMapper_simple_titlecase_mv1(
const icu4x::capi::CaseMapper* self,
char32_t ch);
59 char32_t icu4x_CaseMapper_simple_titlecase_with_compiled_data_mv1(
char32_t ch);
61 char32_t icu4x_CaseMapper_simple_fold_mv1(
const icu4x::capi::CaseMapper* self,
char32_t ch);
63 char32_t icu4x_CaseMapper_simple_fold_with_compiled_data_mv1(
char32_t ch);
65 char32_t icu4x_CaseMapper_simple_fold_turkic_mv1(
const icu4x::capi::CaseMapper* self,
char32_t ch);
67 char32_t icu4x_CaseMapper_simple_fold_turkic_with_compiled_data_mv1(
char32_t ch);
69 void icu4x_CaseMapper_destroy_mv1(CaseMapper* self);
76 auto result = icu4x::capi::icu4x_CaseMapper_create_mv1();
77 return std::unique_ptr<icu4x::CaseMapper>(icu4x::CaseMapper::FromFFI(result));
81 auto result = icu4x::capi::icu4x_CaseMapper_create_with_provider_mv1(provider.AsFFI());
86 if (!icu4x::diplomat::capi::diplomat_is_str(s.data(), s.size())) {
90 icu4x::diplomat::capi::DiplomatWrite write = icu4x::diplomat::WriteFromString(output);
91 icu4x::capi::icu4x_CaseMapper_lowercase_mv1(this->AsFFI(),
99 if (!icu4x::diplomat::capi::diplomat_is_str(s.data(), s.size())) {
103 icu4x::capi::icu4x_CaseMapper_lowercase_mv1(this->AsFFI(),
104 {s.data(), s.size()},
111 if (!icu4x::diplomat::capi::diplomat_is_str(s.data(), s.size())) {
115 icu4x::diplomat::capi::DiplomatWrite write = icu4x::diplomat::WriteFromString(output);
116 icu4x::capi::icu4x_CaseMapper_uppercase_mv1(this->AsFFI(),
117 {s.data(), s.size()},
124 if (!icu4x::diplomat::capi::diplomat_is_str(s.data(), s.size())) {
128 icu4x::capi::icu4x_CaseMapper_uppercase_mv1(this->AsFFI(),
129 {s.data(), s.size()},
136 if (!icu4x::diplomat::capi::diplomat_is_str(s.data(), s.size())) {
140 icu4x::diplomat::capi::DiplomatWrite write = icu4x::diplomat::WriteFromString(output);
141 icu4x::capi::icu4x_CaseMapper_lowercase_with_compiled_data_mv1({s.data(), s.size()},
148 if (!icu4x::diplomat::capi::diplomat_is_str(s.data(), s.size())) {
152 icu4x::capi::icu4x_CaseMapper_lowercase_with_compiled_data_mv1({s.data(), s.size()},
159 if (!icu4x::diplomat::capi::diplomat_is_str(s.data(), s.size())) {
163 icu4x::diplomat::capi::DiplomatWrite write = icu4x::diplomat::WriteFromString(output);
164 icu4x::capi::icu4x_CaseMapper_uppercase_with_compiled_data_mv1({s.data(), s.size()},
171 if (!icu4x::diplomat::capi::diplomat_is_str(s.data(), s.size())) {
175 icu4x::capi::icu4x_CaseMapper_uppercase_with_compiled_data_mv1({s.data(), s.size()},
182 if (!icu4x::diplomat::capi::diplomat_is_str(s.data(), s.size())) {
186 icu4x::diplomat::capi::DiplomatWrite write = icu4x::diplomat::WriteFromString(output);
187 icu4x::capi::icu4x_CaseMapper_titlecase_segment_with_only_case_data_v1_mv1(this->AsFFI(),
188 {s.data(), s.size()},
196 if (!icu4x::diplomat::capi::diplomat_is_str(s.data(), s.size())) {
200 icu4x::capi::icu4x_CaseMapper_titlecase_segment_with_only_case_data_v1_mv1(this->AsFFI(),
201 {s.data(), s.size()},
209 if (!icu4x::diplomat::capi::diplomat_is_str(s.data(), s.size())) {
213 icu4x::diplomat::capi::DiplomatWrite write = icu4x::diplomat::WriteFromString(output);
214 icu4x::capi::icu4x_CaseMapper_titlecase_segment_with_only_case_compiled_data_v1_mv1({s.data(), s.size()},
222 if (!icu4x::diplomat::capi::diplomat_is_str(s.data(), s.size())) {
226 icu4x::capi::icu4x_CaseMapper_titlecase_segment_with_only_case_compiled_data_v1_mv1({s.data(), s.size()},
234 if (!icu4x::diplomat::capi::diplomat_is_str(s.data(), s.size())) {
238 icu4x::diplomat::capi::DiplomatWrite write = icu4x::diplomat::WriteFromString(output);
239 icu4x::capi::icu4x_CaseMapper_fold_mv1(this->AsFFI(),
240 {s.data(), s.size()},
246 if (!icu4x::diplomat::capi::diplomat_is_str(s.data(), s.size())) {
250 icu4x::capi::icu4x_CaseMapper_fold_mv1(this->AsFFI(),
251 {s.data(), s.size()},
257 if (!icu4x::diplomat::capi::diplomat_is_str(s.data(), s.size())) {
261 icu4x::diplomat::capi::DiplomatWrite write = icu4x::diplomat::WriteFromString(output);
262 icu4x::capi::icu4x_CaseMapper_fold_turkic_mv1(this->AsFFI(),
263 {s.data(), s.size()},
269 if (!icu4x::diplomat::capi::diplomat_is_str(s.data(), s.size())) {
273 icu4x::capi::icu4x_CaseMapper_fold_turkic_mv1(this->AsFFI(),
274 {s.data(), s.size()},
280 icu4x::capi::icu4x_CaseMapper_add_case_closure_to_mv1(this->AsFFI(),
286 auto result = icu4x::capi::icu4x_CaseMapper_simple_lowercase_mv1(this->AsFFI(),
292 auto result = icu4x::capi::icu4x_CaseMapper_simple_lowercase_with_compiled_data_mv1(ch);
297 auto result = icu4x::capi::icu4x_CaseMapper_simple_uppercase_mv1(this->AsFFI(),
303 auto result = icu4x::capi::icu4x_CaseMapper_simple_uppercase_with_compiled_data_mv1(ch);
308 auto result = icu4x::capi::icu4x_CaseMapper_simple_titlecase_mv1(this->AsFFI(),
314 auto result = icu4x::capi::icu4x_CaseMapper_simple_titlecase_with_compiled_data_mv1(ch);
319 auto result = icu4x::capi::icu4x_CaseMapper_simple_fold_mv1(this->AsFFI(),
325 auto result = icu4x::capi::icu4x_CaseMapper_simple_fold_with_compiled_data_mv1(ch);
330 auto result = icu4x::capi::icu4x_CaseMapper_simple_fold_turkic_mv1(this->AsFFI(),
336 auto result = icu4x::capi::icu4x_CaseMapper_simple_fold_turkic_with_compiled_data_mv1(ch);
340inline const icu4x::capi::CaseMapper* icu4x::CaseMapper::AsFFI()
const {
341 return reinterpret_cast<const icu4x::capi::CaseMapper*
>(
this);
344inline icu4x::capi::CaseMapper* icu4x::CaseMapper::AsFFI() {
345 return reinterpret_cast<icu4x::capi::CaseMapper*
>(
this);
348inline const icu4x::CaseMapper* icu4x::CaseMapper::FromFFI(
const icu4x::capi::CaseMapper* ptr) {
349 return reinterpret_cast<const icu4x::CaseMapper*
>(ptr);
352inline icu4x::CaseMapper* icu4x::CaseMapper::FromFFI(icu4x::capi::CaseMapper* ptr) {
353 return reinterpret_cast<icu4x::CaseMapper*
>(ptr);
356inline void icu4x::CaseMapper::operator
delete(
void* ptr) {
357 icu4x::capi::icu4x_CaseMapper_destroy_mv1(
reinterpret_cast<icu4x::capi::CaseMapper*
>(ptr));
static std::unique_ptr< icu4x::CaseMapper > create()
Definition CaseMapper.hpp:75
icu4x::diplomat::result< std::string, icu4x::diplomat::Utf8Error > fold(std::string_view s) const
Definition CaseMapper.hpp:233
static icu4x::diplomat::result< std::monostate, icu4x::diplomat::Utf8Error > uppercase_with_compiled_data_write(std::string_view s, const icu4x::Locale &locale, W &writeable_output)
Definition CaseMapper.hpp:170
icu4x::diplomat::result< std::string, icu4x::diplomat::Utf8Error > titlecase_segment_with_only_case_data_v1(std::string_view s, const icu4x::Locale &locale, icu4x::TitlecaseOptionsV1 options) const
Definition CaseMapper.hpp:181
icu4x::diplomat::result< std::string, icu4x::diplomat::Utf8Error > uppercase(std::string_view s, const icu4x::Locale &locale) const
Definition CaseMapper.hpp:110
char32_t simple_fold(char32_t ch) const
Definition CaseMapper.hpp:318
icu4x::diplomat::result< std::monostate, icu4x::diplomat::Utf8Error > fold_write(std::string_view s, W &writeable_output) const
Definition CaseMapper.hpp:245
static icu4x::diplomat::result< std::string, icu4x::diplomat::Utf8Error > titlecase_segment_with_only_case_compiled_data_v1(std::string_view s, const icu4x::Locale &locale, icu4x::TitlecaseOptionsV1 options)
Definition CaseMapper.hpp:208
static icu4x::diplomat::result< std::unique_ptr< icu4x::CaseMapper >, icu4x::DataError > create_with_provider(const icu4x::DataProvider &provider)
Definition CaseMapper.hpp:80
icu4x::diplomat::result< std::monostate, icu4x::diplomat::Utf8Error > lowercase_write(std::string_view s, const icu4x::Locale &locale, W &writeable_output) const
Definition CaseMapper.hpp:98
char32_t simple_titlecase(char32_t ch) const
Definition CaseMapper.hpp:307
void add_case_closure_to(char32_t c, icu4x::CodePointSetBuilder &builder) const
Definition CaseMapper.hpp:279
icu4x::diplomat::result< std::monostate, icu4x::diplomat::Utf8Error > titlecase_segment_with_only_case_data_v1_write(std::string_view s, const icu4x::Locale &locale, icu4x::TitlecaseOptionsV1 options, W &writeable_output) const
Definition CaseMapper.hpp:195
static icu4x::diplomat::result< std::string, icu4x::diplomat::Utf8Error > lowercase_with_compiled_data(std::string_view s, const icu4x::Locale &locale)
Definition CaseMapper.hpp:135
static char32_t simple_uppercase_with_compiled_data(char32_t ch)
Definition CaseMapper.hpp:302
icu4x::diplomat::result< std::string, icu4x::diplomat::Utf8Error > lowercase(std::string_view s, const icu4x::Locale &locale) const
Definition CaseMapper.hpp:85
icu4x::diplomat::result< std::monostate, icu4x::diplomat::Utf8Error > fold_turkic_write(std::string_view s, W &writeable_output) const
Definition CaseMapper.hpp:268
static char32_t simple_fold_turkic_with_compiled_data(char32_t ch)
Definition CaseMapper.hpp:335
char32_t simple_fold_turkic(char32_t ch) const
Definition CaseMapper.hpp:329
static icu4x::diplomat::result< std::string, icu4x::diplomat::Utf8Error > uppercase_with_compiled_data(std::string_view s, const icu4x::Locale &locale)
Definition CaseMapper.hpp:158
static char32_t simple_fold_with_compiled_data(char32_t ch)
Definition CaseMapper.hpp:324
icu4x::diplomat::result< std::string, icu4x::diplomat::Utf8Error > fold_turkic(std::string_view s) const
Definition CaseMapper.hpp:256
icu4x::diplomat::result< std::monostate, icu4x::diplomat::Utf8Error > uppercase_write(std::string_view s, const icu4x::Locale &locale, W &writeable_output) const
Definition CaseMapper.hpp:123
static char32_t simple_titlecase_with_compiled_data(char32_t ch)
Definition CaseMapper.hpp:313
static char32_t simple_lowercase_with_compiled_data(char32_t ch)
Definition CaseMapper.hpp:291
char32_t simple_lowercase(char32_t ch) const
Definition CaseMapper.hpp:285
static icu4x::diplomat::result< std::monostate, icu4x::diplomat::Utf8Error > lowercase_with_compiled_data_write(std::string_view s, const icu4x::Locale &locale, W &writeable_output)
Definition CaseMapper.hpp:147
static icu4x::diplomat::result< std::monostate, icu4x::diplomat::Utf8Error > titlecase_segment_with_only_case_compiled_data_v1_write(std::string_view s, const icu4x::Locale &locale, icu4x::TitlecaseOptionsV1 options, W &writeable_output)
Definition CaseMapper.hpp:221
char32_t simple_uppercase(char32_t ch) const
Definition CaseMapper.hpp:296
Definition CodePointSetBuilder.d.hpp:32
Definition DataError.d.hpp:37
Definition DataProvider.d.hpp:40
Definition Locale.d.hpp:33
Definition diplomat_runtime.hpp:166
Definition TitlecaseOptionsV1.d.hpp:39
Definition diplomat_runtime.hpp:146
Definition diplomat_runtime.hpp:128
Definition diplomat_runtime.hpp:117