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_fold_mv1(
const icu4x::capi::CaseMapper* self, icu4x::diplomat::capi::DiplomatStringView s, icu4x::diplomat::capi::DiplomatWrite* write);
43 void icu4x_CaseMapper_fold_turkic_mv1(
const icu4x::capi::CaseMapper* self, icu4x::diplomat::capi::DiplomatStringView s, icu4x::diplomat::capi::DiplomatWrite* write);
45 void icu4x_CaseMapper_add_case_closure_to_mv1(
const icu4x::capi::CaseMapper* self,
char32_t c, icu4x::capi::CodePointSetBuilder* builder);
47 char32_t icu4x_CaseMapper_simple_lowercase_mv1(
const icu4x::capi::CaseMapper* self,
char32_t ch);
49 char32_t icu4x_CaseMapper_simple_lowercase_with_compiled_data_mv1(
char32_t ch);
51 char32_t icu4x_CaseMapper_simple_uppercase_mv1(
const icu4x::capi::CaseMapper* self,
char32_t ch);
53 char32_t icu4x_CaseMapper_simple_uppercase_with_compiled_data_mv1(
char32_t ch);
55 char32_t icu4x_CaseMapper_simple_titlecase_mv1(
const icu4x::capi::CaseMapper* self,
char32_t ch);
57 char32_t icu4x_CaseMapper_simple_titlecase_with_compiled_data_mv1(
char32_t ch);
59 char32_t icu4x_CaseMapper_simple_fold_mv1(
const icu4x::capi::CaseMapper* self,
char32_t ch);
61 char32_t icu4x_CaseMapper_simple_fold_with_compiled_data_mv1(
char32_t ch);
63 char32_t icu4x_CaseMapper_simple_fold_turkic_mv1(
const icu4x::capi::CaseMapper* self,
char32_t ch);
65 char32_t icu4x_CaseMapper_simple_fold_turkic_with_compiled_data_mv1(
char32_t ch);
67 void icu4x_CaseMapper_destroy_mv1(CaseMapper* self);
74 auto result = icu4x::capi::icu4x_CaseMapper_create_mv1();
75 return std::unique_ptr<icu4x::CaseMapper>(icu4x::CaseMapper::FromFFI(result));
79 auto result = icu4x::capi::icu4x_CaseMapper_create_with_provider_mv1(provider.AsFFI());
84 if (!icu4x::diplomat::capi::diplomat_is_str(s.data(), s.size())) {
88 icu4x::diplomat::capi::DiplomatWrite write = icu4x::diplomat::WriteFromString(output);
89 icu4x::capi::icu4x_CaseMapper_lowercase_mv1(this->AsFFI(),
97 if (!icu4x::diplomat::capi::diplomat_is_str(s.data(), s.size())) {
101 icu4x::capi::icu4x_CaseMapper_lowercase_mv1(this->AsFFI(),
102 {s.data(), s.size()},
109 if (!icu4x::diplomat::capi::diplomat_is_str(s.data(), s.size())) {
113 icu4x::diplomat::capi::DiplomatWrite write = icu4x::diplomat::WriteFromString(output);
114 icu4x::capi::icu4x_CaseMapper_uppercase_mv1(this->AsFFI(),
115 {s.data(), s.size()},
122 if (!icu4x::diplomat::capi::diplomat_is_str(s.data(), s.size())) {
126 icu4x::capi::icu4x_CaseMapper_uppercase_mv1(this->AsFFI(),
127 {s.data(), s.size()},
134 if (!icu4x::diplomat::capi::diplomat_is_str(s.data(), s.size())) {
138 icu4x::diplomat::capi::DiplomatWrite write = icu4x::diplomat::WriteFromString(output);
139 icu4x::capi::icu4x_CaseMapper_lowercase_with_compiled_data_mv1({s.data(), s.size()},
146 if (!icu4x::diplomat::capi::diplomat_is_str(s.data(), s.size())) {
150 icu4x::capi::icu4x_CaseMapper_lowercase_with_compiled_data_mv1({s.data(), s.size()},
157 if (!icu4x::diplomat::capi::diplomat_is_str(s.data(), s.size())) {
161 icu4x::diplomat::capi::DiplomatWrite write = icu4x::diplomat::WriteFromString(output);
162 icu4x::capi::icu4x_CaseMapper_uppercase_with_compiled_data_mv1({s.data(), s.size()},
169 if (!icu4x::diplomat::capi::diplomat_is_str(s.data(), s.size())) {
173 icu4x::capi::icu4x_CaseMapper_uppercase_with_compiled_data_mv1({s.data(), s.size()},
180 if (!icu4x::diplomat::capi::diplomat_is_str(s.data(), s.size())) {
184 icu4x::diplomat::capi::DiplomatWrite write = icu4x::diplomat::WriteFromString(output);
185 icu4x::capi::icu4x_CaseMapper_titlecase_segment_with_only_case_data_v1_mv1(this->AsFFI(),
186 {s.data(), s.size()},
194 if (!icu4x::diplomat::capi::diplomat_is_str(s.data(), s.size())) {
198 icu4x::capi::icu4x_CaseMapper_titlecase_segment_with_only_case_data_v1_mv1(this->AsFFI(),
199 {s.data(), s.size()},
207 if (!icu4x::diplomat::capi::diplomat_is_str(s.data(), s.size())) {
211 icu4x::diplomat::capi::DiplomatWrite write = icu4x::diplomat::WriteFromString(output);
212 icu4x::capi::icu4x_CaseMapper_fold_mv1(this->AsFFI(),
213 {s.data(), s.size()},
219 if (!icu4x::diplomat::capi::diplomat_is_str(s.data(), s.size())) {
223 icu4x::capi::icu4x_CaseMapper_fold_mv1(this->AsFFI(),
224 {s.data(), s.size()},
230 if (!icu4x::diplomat::capi::diplomat_is_str(s.data(), s.size())) {
234 icu4x::diplomat::capi::DiplomatWrite write = icu4x::diplomat::WriteFromString(output);
235 icu4x::capi::icu4x_CaseMapper_fold_turkic_mv1(this->AsFFI(),
236 {s.data(), s.size()},
242 if (!icu4x::diplomat::capi::diplomat_is_str(s.data(), s.size())) {
246 icu4x::capi::icu4x_CaseMapper_fold_turkic_mv1(this->AsFFI(),
247 {s.data(), s.size()},
253 icu4x::capi::icu4x_CaseMapper_add_case_closure_to_mv1(this->AsFFI(),
259 auto result = icu4x::capi::icu4x_CaseMapper_simple_lowercase_mv1(this->AsFFI(),
265 auto result = icu4x::capi::icu4x_CaseMapper_simple_lowercase_with_compiled_data_mv1(ch);
270 auto result = icu4x::capi::icu4x_CaseMapper_simple_uppercase_mv1(this->AsFFI(),
276 auto result = icu4x::capi::icu4x_CaseMapper_simple_uppercase_with_compiled_data_mv1(ch);
281 auto result = icu4x::capi::icu4x_CaseMapper_simple_titlecase_mv1(this->AsFFI(),
287 auto result = icu4x::capi::icu4x_CaseMapper_simple_titlecase_with_compiled_data_mv1(ch);
292 auto result = icu4x::capi::icu4x_CaseMapper_simple_fold_mv1(this->AsFFI(),
298 auto result = icu4x::capi::icu4x_CaseMapper_simple_fold_with_compiled_data_mv1(ch);
303 auto result = icu4x::capi::icu4x_CaseMapper_simple_fold_turkic_mv1(this->AsFFI(),
309 auto result = icu4x::capi::icu4x_CaseMapper_simple_fold_turkic_with_compiled_data_mv1(ch);
313inline const icu4x::capi::CaseMapper* icu4x::CaseMapper::AsFFI()
const {
314 return reinterpret_cast<const icu4x::capi::CaseMapper*
>(
this);
317inline icu4x::capi::CaseMapper* icu4x::CaseMapper::AsFFI() {
318 return reinterpret_cast<icu4x::capi::CaseMapper*
>(
this);
321inline const icu4x::CaseMapper* icu4x::CaseMapper::FromFFI(
const icu4x::capi::CaseMapper* ptr) {
322 return reinterpret_cast<const icu4x::CaseMapper*
>(ptr);
325inline icu4x::CaseMapper* icu4x::CaseMapper::FromFFI(icu4x::capi::CaseMapper* ptr) {
326 return reinterpret_cast<icu4x::CaseMapper*
>(ptr);
329inline void icu4x::CaseMapper::operator
delete(
void* ptr) {
330 icu4x::capi::icu4x_CaseMapper_destroy_mv1(
reinterpret_cast<icu4x::capi::CaseMapper*
>(ptr));
static std::unique_ptr< icu4x::CaseMapper > create()
Definition CaseMapper.hpp:73
icu4x::diplomat::result< std::string, icu4x::diplomat::Utf8Error > fold(std::string_view s) const
Definition CaseMapper.hpp:206
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:168
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:179
icu4x::diplomat::result< std::string, icu4x::diplomat::Utf8Error > uppercase(std::string_view s, const icu4x::Locale &locale) const
Definition CaseMapper.hpp:108
char32_t simple_fold(char32_t ch) const
Definition CaseMapper.hpp:291
icu4x::diplomat::result< std::monostate, icu4x::diplomat::Utf8Error > fold_write(std::string_view s, W &writeable_output) const
Definition CaseMapper.hpp:218
static icu4x::diplomat::result< std::unique_ptr< icu4x::CaseMapper >, icu4x::DataError > create_with_provider(const icu4x::DataProvider &provider)
Definition CaseMapper.hpp:78
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:96
char32_t simple_titlecase(char32_t ch) const
Definition CaseMapper.hpp:280
void add_case_closure_to(char32_t c, icu4x::CodePointSetBuilder &builder) const
Definition CaseMapper.hpp:252
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:193
static icu4x::diplomat::result< std::string, icu4x::diplomat::Utf8Error > lowercase_with_compiled_data(std::string_view s, const icu4x::Locale &locale)
Definition CaseMapper.hpp:133
static char32_t simple_uppercase_with_compiled_data(char32_t ch)
Definition CaseMapper.hpp:275
icu4x::diplomat::result< std::string, icu4x::diplomat::Utf8Error > lowercase(std::string_view s, const icu4x::Locale &locale) const
Definition CaseMapper.hpp:83
icu4x::diplomat::result< std::monostate, icu4x::diplomat::Utf8Error > fold_turkic_write(std::string_view s, W &writeable_output) const
Definition CaseMapper.hpp:241
static char32_t simple_fold_turkic_with_compiled_data(char32_t ch)
Definition CaseMapper.hpp:308
char32_t simple_fold_turkic(char32_t ch) const
Definition CaseMapper.hpp:302
static icu4x::diplomat::result< std::string, icu4x::diplomat::Utf8Error > uppercase_with_compiled_data(std::string_view s, const icu4x::Locale &locale)
Definition CaseMapper.hpp:156
static char32_t simple_fold_with_compiled_data(char32_t ch)
Definition CaseMapper.hpp:297
icu4x::diplomat::result< std::string, icu4x::diplomat::Utf8Error > fold_turkic(std::string_view s) const
Definition CaseMapper.hpp:229
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:121
static char32_t simple_titlecase_with_compiled_data(char32_t ch)
Definition CaseMapper.hpp:286
static char32_t simple_lowercase_with_compiled_data(char32_t ch)
Definition CaseMapper.hpp:264
char32_t simple_lowercase(char32_t ch) const
Definition CaseMapper.hpp:258
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:145
char32_t simple_uppercase(char32_t ch) const
Definition CaseMapper.hpp:269
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