ICU 62.1 62.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"
27#include "unicode/ustring.h"
28
47struct UCaseMap;
48typedef struct UCaseMap UCaseMap;
72U_STABLE UCaseMap * U_EXPORT2
73ucasemap_open(const char *locale, uint32_t options, UErrorCode *pErrorCode);
74
80U_STABLE void U_EXPORT2
82
83#if U_SHOW_CPLUSPLUS_API
84
86
97
99
100#endif
101
108U_STABLE const char * U_EXPORT2
110
117U_STABLE uint32_t U_EXPORT2
119
131U_STABLE void U_EXPORT2
132ucasemap_setLocale(UCaseMap *csm, const char *locale, UErrorCode *pErrorCode);
133
145U_STABLE void U_EXPORT2
146ucasemap_setOptions(UCaseMap *csm, uint32_t options, UErrorCode *pErrorCode);
147
148#if !UCONFIG_NO_BREAK_ITERATION
149
157U_STABLE const UBreakIterator * U_EXPORT2
159
180U_STABLE void U_EXPORT2
182
229U_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
260U_STABLE int32_t U_EXPORT2
262 char *dest, int32_t destCapacity,
263 const char *src, int32_t srcLength,
264 UErrorCode *pErrorCode);
265
289U_STABLE int32_t U_EXPORT2
291 char *dest, int32_t destCapacity,
292 const char *src, int32_t srcLength,
293 UErrorCode *pErrorCode);
294
295#if !UCONFIG_NO_BREAK_ITERATION
296
341U_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
379U_STABLE int32_t U_EXPORT2
381 char *dest, int32_t destCapacity,
382 const char *src, int32_t srcLength,
383 UErrorCode *pErrorCode);
384
385#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.
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:28
void ucasemap_setOptions(UCaseMap *csm, uint32_t options, UErrorCode *pErrorCode)
Set the options bit set that is used for case folding and string comparisons.
void ucasemap_setBreakIterator(UCaseMap *csm, UBreakIterator *iterToAdopt, UErrorCode *pErrorCode)
Set the break iterator that is used for titlecasing.
struct UCaseMap UCaseMap
C typedef for struct UCaseMap.
Definition ucasemap.h:48
int32_t ucasemap_utf8ToTitle(UCaseMap *csm, char *dest, int32_t destCapacity, const char *src, int32_t srcLength, UErrorCode *pErrorCode)
Titlecase a UTF-8 string.
const char * ucasemap_getLocale(const UCaseMap *csm)
Get the locale ID that is used for language-dependent case mappings.
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.
uint32_t ucasemap_getOptions(const UCaseMap *csm)
Get the options bit set that is used for case folding and string comparisons.
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.
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.
void ucasemap_setLocale(UCaseMap *csm, const char *locale, UErrorCode *pErrorCode)
Set the locale ID that is used for language-dependent case mappings.
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 * ucasemap_open(const char *locale, uint32_t options, UErrorCode *pErrorCode)
Open a UCaseMap service object for a locale and a set of options.
void ucasemap_close(UCaseMap *csm)
Close a UCaseMap service object.
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:353
#define U_STABLE
This is used to declare a function as a stable public ICU C API.
Definition umachine.h:111
C API: Unicode string handling functions.
Basic definitions for ICU, for both C and C++ APIs.
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers,...
Definition utypes.h:396
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition uversion.h:138
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition uversion.h:137