ICU 56.1: ucasemap.h Source File

ICU 56.1 56.1

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

- File List
- Globals

ucasemap.h
Go to the documentation of this file.
1 /*
2 *******************************************************************************
3 *
4 * Copyright (C) 2005-2012, International Business Machines
5 * Corporation and others. All Rights Reserved.
6 *
7 *******************************************************************************
8 * file name: ucasemap.h
9 * encoding: US-ASCII
10 * tab size: 8 (not used)
11 * indentation:4
12 *
13 * created on: 2005may06
14 * created by: Markus W. Scherer
15 *
16 * Case mapping service object and functions using it.
17 */
18
19 #ifndef __UCASEMAP_H__
20 #define __UCASEMAP_H__
21
22 #include "unicode/utypes.h"
23 #include "unicode/ustring.h"
24 #include "unicode/localpointer.h"
25
44 struct UCaseMap;
45 typedef struct UCaseMap UCaseMap;
69 U_STABLE UCaseMap * U_EXPORT2
70 ucasemap_open(const char *locale, uint32_t options, UErrorCode *pErrorCode);
71
77 U_STABLE void U_EXPORT2
78 ucasemap_close(UCaseMap *csm);
79
80 #if U_SHOW_CPLUSPLUS_API
81
82 U_NAMESPACE_BEGIN
83
93 U_DEFINE_LOCAL_OPEN_POINTER(LocalUCaseMapPointer, UCaseMap, ucasemap_close);
94
95 U_NAMESPACE_END
96
97 #endif
98
105 U_STABLE const char * U_EXPORT2
106 ucasemap_getLocale(const UCaseMap *csm);
107
114 U_STABLE uint32_t U_EXPORT2
115 ucasemap_getOptions(const UCaseMap *csm);
116
128 U_STABLE void U_EXPORT2
129 ucasemap_setLocale(UCaseMap *csm, const char *locale, UErrorCode *pErrorCode);
130
142 U_STABLE void U_EXPORT2
143 ucasemap_setOptions(UCaseMap *csm, uint32_t options, UErrorCode *pErrorCode);
144
159 #define U_TITLECASE_NO_LOWERCASE 0x100
160
184 #define U_TITLECASE_NO_BREAK_ADJUSTMENT 0x200
185
186 #if !UCONFIG_NO_BREAK_ITERATION
187
195 U_STABLE const UBreakIterator * U_EXPORT2
196 ucasemap_getBreakIterator(const UCaseMap *csm);
197
218 U_STABLE void U_EXPORT2
219 ucasemap_setBreakIterator(UCaseMap *csm, UBreakIterator *iterToAdopt, UErrorCode *pErrorCode);
220
267 U_STABLE int32_t U_EXPORT2
268 ucasemap_toTitle(UCaseMap *csm,
269 UChar *dest, int32_t destCapacity,
270 const UChar *src, int32_t srcLength,
271 UErrorCode *pErrorCode);
272
273 #endif
274
298 U_STABLE int32_t U_EXPORT2
299 ucasemap_utf8ToLower(const UCaseMap *csm,
300 char *dest, int32_t destCapacity,
301 const char *src, int32_t srcLength,
302 UErrorCode *pErrorCode);
303
327 U_STABLE int32_t U_EXPORT2
328 ucasemap_utf8ToUpper(const UCaseMap *csm,
329 char *dest, int32_t destCapacity,
330 const char *src, int32_t srcLength,
331 UErrorCode *pErrorCode);
332
333 #if !UCONFIG_NO_BREAK_ITERATION
334
379 U_STABLE int32_t U_EXPORT2
380 ucasemap_utf8ToTitle(UCaseMap *csm,
381 char *dest, int32_t destCapacity,
382 const char *src, int32_t srcLength,
383 UErrorCode *pErrorCode);
384
385 #endif
386
417 U_STABLE int32_t U_EXPORT2
418 ucasemap_utf8FoldCase(const UCaseMap *csm,
419 char *dest, int32_t destCapacity,
420 const char *src, int32_t srcLength,
421 UErrorCode *pErrorCode);
422
423 #endif
UBreakIterator
struct UBreakIterator UBreakIterator
Opaque type representing an ICU Break iterator object.
Definition: ubrk.h:26
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:45
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:129
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:535
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:312
U_NAMESPACE_END
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition: uversion.h:130
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:476
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:109