ICU 59.1  59.1
casemap.h
Go to the documentation of this file.
1 // © 2017 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
3 
4 // casemap.h
5 // created: 2017jan12 Markus W. Scherer
6 
7 #ifndef __CASEMAP_H__
8 #define __CASEMAP_H__
9 
10 #include "unicode/utypes.h"
11 #include "unicode/uobject.h"
12 
19 
20 #ifndef U_HIDE_DRAFT_API
21 
22 class BreakIterator;
23 class Edits;
24 
30 class U_COMMON_API CaseMap U_FINAL : public UMemory {
31 public:
61  static int32_t toLower(
62  const char *locale, uint32_t options,
63  const char16_t *src, int32_t srcLength,
64  char16_t *dest, int32_t destCapacity, Edits *edits,
65  UErrorCode &errorCode);
66 
96  static int32_t toUpper(
97  const char *locale, uint32_t options,
98  const char16_t *src, int32_t srcLength,
99  char16_t *dest, int32_t destCapacity, Edits *edits,
100  UErrorCode &errorCode);
101 
102 #if !UCONFIG_NO_BREAK_ITERATION
103 
144  static int32_t toTitle(
145  const char *locale, uint32_t options, BreakIterator *iter,
146  const char16_t *src, int32_t srcLength,
147  char16_t *dest, int32_t destCapacity, Edits *edits,
148  UErrorCode &errorCode);
149 
150 #endif // UCONFIG_NO_BREAK_ITERATION
151 
185  static int32_t fold(
186  uint32_t options,
187  const char16_t *src, int32_t srcLength,
188  char16_t *dest, int32_t destCapacity, Edits *edits,
189  UErrorCode &errorCode);
190 
220  static int32_t utf8ToLower(
221  const char *locale, uint32_t options,
222  const char *src, int32_t srcLength,
223  char *dest, int32_t destCapacity, Edits *edits,
224  UErrorCode &errorCode);
225 
255  static int32_t utf8ToUpper(
256  const char *locale, uint32_t options,
257  const char *src, int32_t srcLength,
258  char *dest, int32_t destCapacity, Edits *edits,
259  UErrorCode &errorCode);
260 
261 #if !UCONFIG_NO_BREAK_ITERATION
262 
302  static int32_t utf8ToTitle(
303  const char *locale, uint32_t options, BreakIterator *iter,
304  const char *src, int32_t srcLength,
305  char *dest, int32_t destCapacity, Edits *edits,
306  UErrorCode &errorCode);
307 
308 #endif // UCONFIG_NO_BREAK_ITERATION
309 
343  static int32_t utf8Fold(
344  uint32_t options,
345  const char *src, int32_t srcLength,
346  char *dest, int32_t destCapacity, Edits *edits,
347  UErrorCode &errorCode);
348 
349 private:
350  CaseMap() = delete;
351  CaseMap(const CaseMap &other) = delete;
352  CaseMap &operator=(const CaseMap &other) = delete;
353 };
354 
355 #endif // U_HIDE_DRAFT_API
356 
358 
359 #endif // __CASEMAP_H__
Records lengths of string edits but not replacement text.
Definition: edits.h:32
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition: uversion.h:131
The BreakIterator class implements methods for finding the location of boundaries in text...
Definition: brkiter.h:102
C++ API: Common ICU base class UObject.
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition: uversion.h:132
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
Definition: utypes.h:396
Basic definitions for ICU, for both C and C++ APIs.
#define U_COMMON_API
Set to export library symbols from inside the common library, and to import them from outside...
Definition: utypes.h:359
Low-level C++ case mapping functions.
Definition: casemap.h:30
UMemory is the common ICU base class.
Definition: uobject.h:112