ICU 58.2 58.2

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- File List
- Globals

ucasemap.h
Go to the documentation of this file.
1 // Copyright (C) 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
3 /*
4 *******************************************************************************
5 *
6 * Copyright (C) 2005-2012, International Business Machines
7 * Corporation and others. All Rights Reserved.
8 *
9 *******************************************************************************
10 * file name: ucasemap.h
11 * encoding: US-ASCII
12 * tab size: 8 (not used)
13 * indentation:4
14 *
15 * created on: 2005may06
16 * created by: Markus W. Scherer
17 *
18 * Case mapping service object and functions using it.
19 */
20
21 #ifndef __UCASEMAP_H__
22 #define __UCASEMAP_H__
23
24 #include "unicode/utypes.h"
25 #include "unicode/ustring.h"
26 #include "unicode/localpointer.h"
27
46 struct UCaseMap;
47 typedef struct UCaseMap UCaseMap;
71 U_STABLE UCaseMap * U_EXPORT2
72 ucasemap_open(const char *locale, uint32_t options, UErrorCode *pErrorCode);
73
79 U_STABLE void U_EXPORT2
80 ucasemap_close(UCaseMap *csm);
81
82 #if U_SHOW_CPLUSPLUS_API
83
84 U_NAMESPACE_BEGIN
85
95 U_DEFINE_LOCAL_OPEN_POINTER(LocalUCaseMapPointer, UCaseMap, ucasemap_close);
96
97 U_NAMESPACE_END
98
99 #endif
100
107 U_STABLE const char * U_EXPORT2
108 ucasemap_getLocale(const UCaseMap *csm);
109
116 U_STABLE uint32_t U_EXPORT2
117 ucasemap_getOptions(const UCaseMap *csm);
118
130 U_STABLE void U_EXPORT2
131 ucasemap_setLocale(UCaseMap *csm, const char *locale, UErrorCode *pErrorCode);
132
144 U_STABLE void U_EXPORT2
145 ucasemap_setOptions(UCaseMap *csm, uint32_t options, UErrorCode *pErrorCode);
146
161 #define U_TITLECASE_NO_LOWERCASE 0x100
162
186 #define U_TITLECASE_NO_BREAK_ADJUSTMENT 0x200
187
188 #if !UCONFIG_NO_BREAK_ITERATION
189
197 U_STABLE const UBreakIterator * U_EXPORT2
198 ucasemap_getBreakIterator(const UCaseMap *csm);
199
220 U_STABLE void U_EXPORT2
221 ucasemap_setBreakIterator(UCaseMap *csm, UBreakIterator *iterToAdopt, UErrorCode *pErrorCode);
222
269 U_STABLE int32_t U_EXPORT2
270 ucasemap_toTitle(UCaseMap *csm,
271 UChar *dest, int32_t destCapacity,
272 const UChar *src, int32_t srcLength,
273 UErrorCode *pErrorCode);
274
275 #endif
276
300 U_STABLE int32_t U_EXPORT2
301 ucasemap_utf8ToLower(const UCaseMap *csm,
302 char *dest, int32_t destCapacity,
303 const char *src, int32_t srcLength,
304 UErrorCode *pErrorCode);
305
329 U_STABLE int32_t U_EXPORT2
330 ucasemap_utf8ToUpper(const UCaseMap *csm,
331 char *dest, int32_t destCapacity,
332 const char *src, int32_t srcLength,
333 UErrorCode *pErrorCode);
334
335 #if !UCONFIG_NO_BREAK_ITERATION
336
381 U_STABLE int32_t U_EXPORT2
382 ucasemap_utf8ToTitle(UCaseMap *csm,
383 char *dest, int32_t destCapacity,
384 const char *src, int32_t srcLength,
385 UErrorCode *pErrorCode);
386
387 #endif
388
419 U_STABLE int32_t U_EXPORT2
420 ucasemap_utf8FoldCase(const UCaseMap *csm,
421 char *dest, int32_t destCapacity,
422 const char *src, int32_t srcLength,
423 UErrorCode *pErrorCode);
424
425 #endif
UBreakIterator
struct UBreakIterator UBreakIterator
Opaque type representing an ICU Break iterator object.
Definition: ubrk.h:28
ucasemap_utf8ToTitle
int32_t ucasemap_utf8ToTitle(UCaseMap *csm, char *dest, int32_t destCapacity, const char *src, int32_t srcLength, UErrorCode *pErrorCode)
Titlecase a UTF-8 string.
LocalUCaseMapPointer
"Smart pointer" class, closes a UCaseMap via ucasemap_close().
ucasemap_utf8FoldCase
int32_t ucasemap_utf8FoldCase(const UCaseMap *csm, char *dest, int32_t destCapacity, const char *src, int32_t srcLength, UErrorCode *pErrorCode)
Case-folds the characters in a UTF-8 string.
UCaseMap
struct UCaseMap UCaseMap
C typedef for struct UCaseMap.
Definition: ucasemap.h:47
ucasemap_toTitle
int32_t ucasemap_toTitle(UCaseMap *csm, UChar *dest, int32_t destCapacity, const UChar *src, int32_t srcLength, UErrorCode *pErrorCode)
Titlecase a UTF-16 string.
ucasemap_close
void ucasemap_close(UCaseMap *csm)
Close a UCaseMap service object.
U_NAMESPACE_BEGIN
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition: uversion.h:131
U_DEFINE_LOCAL_OPEN_POINTER
#define U_DEFINE_LOCAL_OPEN_POINTER(LocalPointerClassName, Type, closeFunction)
"Smart pointer" definition macro, deletes objects via the closeFunction.
Definition: localpointer.h:530
ucasemap_getLocale
const char * ucasemap_getLocale(const UCaseMap *csm)
Get the locale ID that is used for language-dependent case mappings.
localpointer.h
C++ API: "Smart pointers" for use with and in ICU4C C++ code.
ucasemap_utf8ToLower
int32_t ucasemap_utf8ToLower(const UCaseMap *csm, char *dest, int32_t destCapacity, const char *src, int32_t srcLength, UErrorCode *pErrorCode)
Lowercase the characters in a UTF-8 string.
ucasemap_open
UCaseMap * ucasemap_open(const char *locale, uint32_t options, UErrorCode *pErrorCode)
Open a UCaseMap service object for a locale and a set of options.
ustring.h
C API: Unicode string handling functions.
ucasemap_getBreakIterator
const UBreakIterator * ucasemap_getBreakIterator(const UCaseMap *csm)
Get the break iterator that is used for titlecasing.
UChar
uint16_t UChar
Define UChar to be UCHAR_TYPE, if that is #defined (for example, to char16_t), or wchar_t if that is ...
Definition: umachine.h:337
U_NAMESPACE_END
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition: uversion.h:132
ucasemap_utf8ToUpper
int32_t ucasemap_utf8ToUpper(const UCaseMap *csm, char *dest, int32_t destCapacity, const char *src, int32_t srcLength, UErrorCode *pErrorCode)
Uppercase the characters in a UTF-8 string.
UErrorCode
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
Definition: utypes.h:396
ucasemap_setBreakIterator
void ucasemap_setBreakIterator(UCaseMap *csm, UBreakIterator *iterToAdopt, UErrorCode *pErrorCode)
Set the break iterator that is used for titlecasing.
ucasemap_setLocale
void ucasemap_setLocale(UCaseMap *csm, const char *locale, UErrorCode *pErrorCode)
Set the locale ID that is used for language-dependent case mappings.
utypes.h
Basic definitions for ICU, for both C and C++ APIs.
ucasemap_getOptions
uint32_t ucasemap_getOptions(const UCaseMap *csm)
Get the options bit set that is used for case folding and string comparisons.
ucasemap_setOptions
void ucasemap_setOptions(UCaseMap *csm, uint32_t options, UErrorCode *pErrorCode)
Set the options bit set that is used for case folding and string comparisons.
U_STABLE
#define U_STABLE
This is used to declare a function as a stable public ICU C API.
Definition: umachine.h:134