ICU 50.1.2  50.1.2
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
79 
80 #if U_SHOW_CPLUSPLUS_API
81 
83 
94 
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
197 
218 U_STABLE void U_EXPORT2
219 ucasemap_setBreakIterator(UCaseMap *csm, UBreakIterator *iterToAdopt, UErrorCode *pErrorCode);
220 
267 U_STABLE int32_t U_EXPORT2
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
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
419  char *dest, int32_t destCapacity,
420  const char *src, int32_t srcLength,
421  UErrorCode *pErrorCode);
422 
423 #endif
struct UBreakIterator UBreakIterator
Opaque type representing an ICU Break iterator object.
Definition: ubrk.h:26
int32_t ucasemap_utf8ToTitle(UCaseMap *csm, char *dest, int32_t destCapacity, const char *src, int32_t srcLength, UErrorCode *pErrorCode)
Titlecase a UTF-8 string.
"Smart pointer" class, closes a UCaseMap via ucasemap_close().
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.
struct UCaseMap UCaseMap
C typedef for struct UCaseMap.
Definition: ucasemap.h:45
int32_t ucasemap_toTitle(UCaseMap *csm, UChar *dest, int32_t destCapacity, const UChar *src, int32_t srcLength, UErrorCode *pErrorCode)
Titlecase a UTF-16 string.
void ucasemap_close(UCaseMap *csm)
Close a UCaseMap service object.
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition: uversion.h:129
#define U_DEFINE_LOCAL_OPEN_POINTER(LocalPointerClassName, Type, closeFunction)
"Smart pointer" definition macro, deletes objects via the closeFunction.
Definition: localpointer.h:290
const char * ucasemap_getLocale(const UCaseMap *csm)
Get the locale ID that is used for language-dependent case mappings.
C++ API: "Smart pointers" for use with and in ICU4C C++ code.
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 * ucasemap_open(const char *locale, uint32_t options, UErrorCode *pErrorCode)
Open a UCaseMap service object for a locale and a set of options.
C API: Unicode string handling functions.
const UBreakIterator * ucasemap_getBreakIterator(const UCaseMap *csm)
Get the break iterator that is used for titlecasing.
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:278
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition: uversion.h:130
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
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
Definition: utypes.h:476
void ucasemap_setBreakIterator(UCaseMap *csm, UBreakIterator *iterToAdopt, UErrorCode *pErrorCode)
Set the break iterator that is used for titlecasing.
void ucasemap_setLocale(UCaseMap *csm, const char *locale, UErrorCode *pErrorCode)
Set the locale ID that is used for language-dependent case mappings.
Basic definitions for ICU, for both C and C++ APIs.
uint32_t ucasemap_getOptions(const UCaseMap *csm)
Get the options bit set that is used for case folding and string comparisons.
void ucasemap_setOptions(UCaseMap *csm, uint32_t options, UErrorCode *pErrorCode)
Set the options bit set that is used for case folding and string comparisons.
#define U_STABLE
This is used to declare a function as a stable public ICU C API.
Definition: umachine.h:109