|
ICU 73.2
73.2
|
00001 // © 2017 and later: Unicode, Inc. and others. 00002 // License & terms of use: http://www.unicode.org/copyright.html 00003 00004 // casemap.h 00005 // created: 2017jan12 Markus W. Scherer 00006 00007 #ifndef __CASEMAP_H__ 00008 #define __CASEMAP_H__ 00009 00010 #include "unicode/utypes.h" 00011 00012 #if U_SHOW_CPLUSPLUS_API 00013 00014 #include "unicode/stringpiece.h" 00015 #include "unicode/uobject.h" 00016 00022 U_NAMESPACE_BEGIN 00023 00024 class BreakIterator; 00025 class ByteSink; 00026 class Edits; 00027 00033 class U_COMMON_API CaseMap final : public UMemory { 00034 public: 00065 static int32_t toLower( 00066 const char *locale, uint32_t options, 00067 const char16_t *src, int32_t srcLength, 00068 char16_t *dest, int32_t destCapacity, Edits *edits, 00069 UErrorCode &errorCode); 00070 00101 static int32_t toUpper( 00102 const char *locale, uint32_t options, 00103 const char16_t *src, int32_t srcLength, 00104 char16_t *dest, int32_t destCapacity, Edits *edits, 00105 UErrorCode &errorCode); 00106 00107 #if !UCONFIG_NO_BREAK_ITERATION 00108 00152 static int32_t toTitle( 00153 const char *locale, uint32_t options, BreakIterator *iter, 00154 const char16_t *src, int32_t srcLength, 00155 char16_t *dest, int32_t destCapacity, Edits *edits, 00156 UErrorCode &errorCode); 00157 00158 #endif // UCONFIG_NO_BREAK_ITERATION 00159 00194 static int32_t fold( 00195 uint32_t options, 00196 const char16_t *src, int32_t srcLength, 00197 char16_t *dest, int32_t destCapacity, Edits *edits, 00198 UErrorCode &errorCode); 00199 00221 static void utf8ToLower( 00222 const char *locale, uint32_t options, 00223 StringPiece src, ByteSink &sink, Edits *edits, 00224 UErrorCode &errorCode); 00225 00247 static void utf8ToUpper( 00248 const char *locale, uint32_t options, 00249 StringPiece src, ByteSink &sink, Edits *edits, 00250 UErrorCode &errorCode); 00251 00252 #if !UCONFIG_NO_BREAK_ITERATION 00253 00287 static void utf8ToTitle( 00288 const char *locale, uint32_t options, BreakIterator *iter, 00289 StringPiece src, ByteSink &sink, Edits *edits, 00290 UErrorCode &errorCode); 00291 00292 #endif // UCONFIG_NO_BREAK_ITERATION 00293 00318 static void utf8Fold( 00319 uint32_t options, 00320 StringPiece src, ByteSink &sink, Edits *edits, 00321 UErrorCode &errorCode); 00322 00353 static int32_t utf8ToLower( 00354 const char *locale, uint32_t options, 00355 const char *src, int32_t srcLength, 00356 char *dest, int32_t destCapacity, Edits *edits, 00357 UErrorCode &errorCode); 00358 00389 static int32_t utf8ToUpper( 00390 const char *locale, uint32_t options, 00391 const char *src, int32_t srcLength, 00392 char *dest, int32_t destCapacity, Edits *edits, 00393 UErrorCode &errorCode); 00394 00395 #if !UCONFIG_NO_BREAK_ITERATION 00396 00439 static int32_t utf8ToTitle( 00440 const char *locale, uint32_t options, BreakIterator *iter, 00441 const char *src, int32_t srcLength, 00442 char *dest, int32_t destCapacity, Edits *edits, 00443 UErrorCode &errorCode); 00444 00445 #endif // UCONFIG_NO_BREAK_ITERATION 00446 00481 static int32_t utf8Fold( 00482 uint32_t options, 00483 const char *src, int32_t srcLength, 00484 char *dest, int32_t destCapacity, Edits *edits, 00485 UErrorCode &errorCode); 00486 00487 private: 00488 CaseMap() = delete; 00489 CaseMap(const CaseMap &other) = delete; 00490 CaseMap &operator=(const CaseMap &other) = delete; 00491 }; 00492 00493 U_NAMESPACE_END 00494 00495 #endif /* U_SHOW_CPLUSPLUS_API */ 00496 00497 #endif // __CASEMAP_H__
1.7.6.1