ICU 70.1  70.1
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/stringoptions.h"
26 #include "unicode/ustring.h"
27 
28 #if U_SHOW_CPLUSPLUS_API
29 #include "unicode/localpointer.h"
30 #endif // U_SHOW_CPLUSPLUS_API
31 
50 struct UCaseMap;
51 typedef struct UCaseMap UCaseMap;
75 U_CAPI UCaseMap * U_EXPORT2
76 ucasemap_open(const char *locale, uint32_t options, UErrorCode *pErrorCode);
77 
83 U_CAPI void U_EXPORT2
85 
86 #if U_SHOW_CPLUSPLUS_API
87 
88 U_NAMESPACE_BEGIN
89 
100 
101 U_NAMESPACE_END
102 
103 #endif
104 
111 U_CAPI const char * U_EXPORT2
113 
120 U_CAPI uint32_t U_EXPORT2
122 
134 U_CAPI void U_EXPORT2
135 ucasemap_setLocale(UCaseMap *csm, const char *locale, UErrorCode *pErrorCode);
136 
148 U_CAPI void U_EXPORT2
149 ucasemap_setOptions(UCaseMap *csm, uint32_t options, UErrorCode *pErrorCode);
150 
151 #if !UCONFIG_NO_BREAK_ITERATION
152 
160 U_CAPI const UBreakIterator * U_EXPORT2
162 
183 U_CAPI void U_EXPORT2
185 
232 U_CAPI int32_t U_EXPORT2
234  UChar *dest, int32_t destCapacity,
235  const UChar *src, int32_t srcLength,
236  UErrorCode *pErrorCode);
237 
238 #endif // UCONFIG_NO_BREAK_ITERATION
239 
263 U_CAPI int32_t U_EXPORT2
265  char *dest, int32_t destCapacity,
266  const char *src, int32_t srcLength,
267  UErrorCode *pErrorCode);
268 
292 U_CAPI int32_t U_EXPORT2
294  char *dest, int32_t destCapacity,
295  const char *src, int32_t srcLength,
296  UErrorCode *pErrorCode);
297 
298 #if !UCONFIG_NO_BREAK_ITERATION
299 
344 U_CAPI int32_t U_EXPORT2
346  char *dest, int32_t destCapacity,
347  const char *src, int32_t srcLength,
348  UErrorCode *pErrorCode);
349 
350 #endif
351 
382 U_CAPI int32_t U_EXPORT2
384  char *dest, int32_t destCapacity,
385  const char *src, int32_t srcLength,
386  UErrorCode *pErrorCode);
387 
388 #endif
"Smart pointer" class, closes a UCaseMap via ucasemap_close().
C++ API: "Smart pointers" for use with and in ICU4C C++ code.
#define U_DEFINE_LOCAL_OPEN_POINTER(LocalPointerClassName, Type, closeFunction)
"Smart pointer" definition macro, deletes objects via the closeFunction.
Definition: localpointer.h:550
C API: Bit set option bit constants for various string and character processing functions.
struct UBreakIterator UBreakIterator
Opaque type representing an ICU Break iterator object.
Definition: ubrk.h:31
U_CAPI uint32_t ucasemap_getOptions(const UCaseMap *csm)
Get the options bit set that is used for case folding and string comparisons.
U_CAPI 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.
U_CAPI 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_CAPI 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.
U_CAPI 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.
struct UCaseMap UCaseMap
C typedef for struct UCaseMap.
Definition: ucasemap.h:51
U_CAPI void ucasemap_close(UCaseMap *csm)
Close a UCaseMap service object.
U_CAPI int32_t ucasemap_utf8ToTitle(UCaseMap *csm, char *dest, int32_t destCapacity, const char *src, int32_t srcLength, UErrorCode *pErrorCode)
Titlecase a UTF-8 string.
U_CAPI void ucasemap_setBreakIterator(UCaseMap *csm, UBreakIterator *iterToAdopt, UErrorCode *pErrorCode)
Set the break iterator that is used for titlecasing.
U_CAPI UCaseMap * ucasemap_open(const char *locale, uint32_t options, UErrorCode *pErrorCode)
Open a UCaseMap service object for a locale and a set of options.
U_CAPI int32_t ucasemap_toTitle(UCaseMap *csm, UChar *dest, int32_t destCapacity, const UChar *src, int32_t srcLength, UErrorCode *pErrorCode)
Titlecase a UTF-16 string.
U_CAPI const UBreakIterator * ucasemap_getBreakIterator(const UCaseMap *csm)
Get the break iterator that is used for titlecasing.
U_CAPI void ucasemap_setLocale(UCaseMap *csm, const char *locale, UErrorCode *pErrorCode)
Set the locale ID that is used for language-dependent case mappings.
U_CAPI const char * ucasemap_getLocale(const UCaseMap *csm)
Get the locale ID that is used for language-dependent case mappings.
#define U_CAPI
This is used to declare a function as a public ICU C API.
Definition: umachine.h:110
char16_t UChar
The base type for UTF-16 code units and pointers.
Definition: umachine.h:418
C API: Unicode string handling functions.
Basic definitions for ICU, for both C and C++ APIs.
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.
Definition: utypes.h:415