ICU 64.2  64.2
ucasemap.h
Go to the documentation of this file.
1 // © 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: UTF-8
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/localpointer.h"
26 #include "unicode/stringoptions.h"
27 #include "unicode/ustring.h"
28 
47 struct UCaseMap;
48 typedef struct UCaseMap UCaseMap;
72 U_STABLE UCaseMap * U_EXPORT2
73 ucasemap_open(const char *locale, uint32_t options, UErrorCode *pErrorCode);
74 
80 U_STABLE void U_EXPORT2
82 
83 #if U_SHOW_CPLUSPLUS_API
84 
86 
97 
99 
100 #endif
101 
108 U_STABLE const char * U_EXPORT2
109 ucasemap_getLocale(const UCaseMap *csm);
110 
117 U_STABLE uint32_t U_EXPORT2
118 ucasemap_getOptions(const UCaseMap *csm);
119 
131 U_STABLE void U_EXPORT2
132 ucasemap_setLocale(UCaseMap *csm, const char *locale, UErrorCode *pErrorCode);
133 
145 U_STABLE void U_EXPORT2
146 ucasemap_setOptions(UCaseMap *csm, uint32_t options, UErrorCode *pErrorCode);
147 
148 #if !UCONFIG_NO_BREAK_ITERATION
149 
157 U_STABLE const UBreakIterator * U_EXPORT2
159 
180 U_STABLE void U_EXPORT2
181 ucasemap_setBreakIterator(UCaseMap *csm, UBreakIterator *iterToAdopt, UErrorCode *pErrorCode);
182 
229 U_STABLE int32_t U_EXPORT2
231  UChar *dest, int32_t destCapacity,
232  const UChar *src, int32_t srcLength,
233  UErrorCode *pErrorCode);
234 
235 #endif // UCONFIG_NO_BREAK_ITERATION
236 
260 U_STABLE int32_t U_EXPORT2
261 ucasemap_utf8ToLower(const UCaseMap *csm,
262  char *dest, int32_t destCapacity,
263  const char *src, int32_t srcLength,
264  UErrorCode *pErrorCode);
265 
289 U_STABLE int32_t U_EXPORT2
290 ucasemap_utf8ToUpper(const UCaseMap *csm,
291  char *dest, int32_t destCapacity,
292  const char *src, int32_t srcLength,
293  UErrorCode *pErrorCode);
294 
295 #if !UCONFIG_NO_BREAK_ITERATION
296 
341 U_STABLE int32_t U_EXPORT2
343  char *dest, int32_t destCapacity,
344  const char *src, int32_t srcLength,
345  UErrorCode *pErrorCode);
346 
347 #endif
348 
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
struct UBreakIterator UBreakIterator
Opaque type representing an ICU Break iterator object.
Definition: ubrk.h:28
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().
C API: Bit set option bit constants for various string and character processing functions.
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:48
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:137
#define U_DEFINE_LOCAL_OPEN_POINTER(LocalPointerClassName, Type, closeFunction)
"Smart pointer" definition macro, deletes objects via the closeFunction.
Definition: localpointer.h:562
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
The base type for UTF-16 code units and pointers.
Definition: umachine.h:342
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition: uversion.h:138
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:401
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:111