00001
00002
00003
00004
00005
00006
00007 #ifndef __CASEMAP_H__
00008 #define __CASEMAP_H__
00009
00010 #include "unicode/utypes.h"
00011 #include "unicode/stringpiece.h"
00012 #include "unicode/uobject.h"
00013
00019 U_NAMESPACE_BEGIN
00020
00021 #ifndef U_HIDE_DRAFT_API
00022
00023 class BreakIterator;
00024 class ByteSink;
00025 class Edits;
00026
00032 class U_COMMON_API CaseMap U_FINAL : public UMemory {
00033 public:
00064 static int32_t toLower(
00065 const char *locale, uint32_t options,
00066 const char16_t *src, int32_t srcLength,
00067 char16_t *dest, int32_t destCapacity, Edits *edits,
00068 UErrorCode &errorCode);
00069
00100 static int32_t toUpper(
00101 const char *locale, uint32_t options,
00102 const char16_t *src, int32_t srcLength,
00103 char16_t *dest, int32_t destCapacity, Edits *edits,
00104 UErrorCode &errorCode);
00105
00106 #if !UCONFIG_NO_BREAK_ITERATION
00107
00151 static int32_t toTitle(
00152 const char *locale, uint32_t options, BreakIterator *iter,
00153 const char16_t *src, int32_t srcLength,
00154 char16_t *dest, int32_t destCapacity, Edits *edits,
00155 UErrorCode &errorCode);
00156
00157 #endif // UCONFIG_NO_BREAK_ITERATION
00158
00193 static int32_t fold(
00194 uint32_t options,
00195 const char16_t *src, int32_t srcLength,
00196 char16_t *dest, int32_t destCapacity, Edits *edits,
00197 UErrorCode &errorCode);
00198
00220 static void utf8ToLower(
00221 const char *locale, uint32_t options,
00222 StringPiece src, ByteSink &sink, Edits *edits,
00223 UErrorCode &errorCode);
00224
00246 static void utf8ToUpper(
00247 const char *locale, uint32_t options,
00248 StringPiece src, ByteSink &sink, Edits *edits,
00249 UErrorCode &errorCode);
00250
00251 #if !UCONFIG_NO_BREAK_ITERATION
00252
00286 static void utf8ToTitle(
00287 const char *locale, uint32_t options, BreakIterator *iter,
00288 StringPiece src, ByteSink &sink, Edits *edits,
00289 UErrorCode &errorCode);
00290
00291 #endif // UCONFIG_NO_BREAK_ITERATION
00292
00317 static void utf8Fold(
00318 uint32_t options,
00319 StringPiece src, ByteSink &sink, Edits *edits,
00320 UErrorCode &errorCode);
00321
00352 static int32_t utf8ToLower(
00353 const char *locale, uint32_t options,
00354 const char *src, int32_t srcLength,
00355 char *dest, int32_t destCapacity, Edits *edits,
00356 UErrorCode &errorCode);
00357
00388 static int32_t utf8ToUpper(
00389 const char *locale, uint32_t options,
00390 const char *src, int32_t srcLength,
00391 char *dest, int32_t destCapacity, Edits *edits,
00392 UErrorCode &errorCode);
00393
00394 #if !UCONFIG_NO_BREAK_ITERATION
00395
00438 static int32_t utf8ToTitle(
00439 const char *locale, uint32_t options, BreakIterator *iter,
00440 const char *src, int32_t srcLength,
00441 char *dest, int32_t destCapacity, Edits *edits,
00442 UErrorCode &errorCode);
00443
00444 #endif // UCONFIG_NO_BREAK_ITERATION
00445
00480 static int32_t utf8Fold(
00481 uint32_t options,
00482 const char *src, int32_t srcLength,
00483 char *dest, int32_t destCapacity, Edits *edits,
00484 UErrorCode &errorCode);
00485
00486 private:
00487 CaseMap() = delete;
00488 CaseMap(const CaseMap &other) = delete;
00489 CaseMap &operator=(const CaseMap &other) = delete;
00490 };
00491
00492 #endif // U_HIDE_DRAFT_API
00493
00494 U_NAMESPACE_END
00495
00496 #endif // __CASEMAP_H__