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 class BreakIterator;
00022 class ByteSink;
00023 class Edits;
00024
00030 class U_COMMON_API CaseMap U_FINAL : public UMemory {
00031 public:
00062 static int32_t toLower(
00063 const char *locale, uint32_t options,
00064 const char16_t *src, int32_t srcLength,
00065 char16_t *dest, int32_t destCapacity, Edits *edits,
00066 UErrorCode &errorCode);
00067
00098 static int32_t toUpper(
00099 const char *locale, uint32_t options,
00100 const char16_t *src, int32_t srcLength,
00101 char16_t *dest, int32_t destCapacity, Edits *edits,
00102 UErrorCode &errorCode);
00103
00104 #if !UCONFIG_NO_BREAK_ITERATION
00105
00149 static int32_t toTitle(
00150 const char *locale, uint32_t options, BreakIterator *iter,
00151 const char16_t *src, int32_t srcLength,
00152 char16_t *dest, int32_t destCapacity, Edits *edits,
00153 UErrorCode &errorCode);
00154
00155 #endif // UCONFIG_NO_BREAK_ITERATION
00156
00191 static int32_t fold(
00192 uint32_t options,
00193 const char16_t *src, int32_t srcLength,
00194 char16_t *dest, int32_t destCapacity, Edits *edits,
00195 UErrorCode &errorCode);
00196
00218 static void utf8ToLower(
00219 const char *locale, uint32_t options,
00220 StringPiece src, ByteSink &sink, Edits *edits,
00221 UErrorCode &errorCode);
00222
00244 static void utf8ToUpper(
00245 const char *locale, uint32_t options,
00246 StringPiece src, ByteSink &sink, Edits *edits,
00247 UErrorCode &errorCode);
00248
00249 #if !UCONFIG_NO_BREAK_ITERATION
00250
00284 static void utf8ToTitle(
00285 const char *locale, uint32_t options, BreakIterator *iter,
00286 StringPiece src, ByteSink &sink, Edits *edits,
00287 UErrorCode &errorCode);
00288
00289 #endif // UCONFIG_NO_BREAK_ITERATION
00290
00315 static void utf8Fold(
00316 uint32_t options,
00317 StringPiece src, ByteSink &sink, Edits *edits,
00318 UErrorCode &errorCode);
00319
00350 static int32_t utf8ToLower(
00351 const char *locale, uint32_t options,
00352 const char *src, int32_t srcLength,
00353 char *dest, int32_t destCapacity, Edits *edits,
00354 UErrorCode &errorCode);
00355
00386 static int32_t utf8ToUpper(
00387 const char *locale, uint32_t options,
00388 const char *src, int32_t srcLength,
00389 char *dest, int32_t destCapacity, Edits *edits,
00390 UErrorCode &errorCode);
00391
00392 #if !UCONFIG_NO_BREAK_ITERATION
00393
00436 static int32_t utf8ToTitle(
00437 const char *locale, uint32_t options, BreakIterator *iter,
00438 const char *src, int32_t srcLength,
00439 char *dest, int32_t destCapacity, Edits *edits,
00440 UErrorCode &errorCode);
00441
00442 #endif // UCONFIG_NO_BREAK_ITERATION
00443
00478 static int32_t utf8Fold(
00479 uint32_t options,
00480 const char *src, int32_t srcLength,
00481 char *dest, int32_t destCapacity, Edits *edits,
00482 UErrorCode &errorCode);
00483
00484 private:
00485 CaseMap() = delete;
00486 CaseMap(const CaseMap &other) = delete;
00487 CaseMap &operator=(const CaseMap &other) = delete;
00488 };
00489
00490 U_NAMESPACE_END
00491
00492 #endif // __CASEMAP_H__