ICU 57.1 57.1
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"
25
44struct UCaseMap;
45typedef struct UCaseMap UCaseMap;
69U_STABLE UCaseMap * U_EXPORT2
70ucasemap_open(const char *locale, uint32_t options, UErrorCode *pErrorCode);
71
77U_STABLE void U_EXPORT2
79
80#if U_SHOW_CPLUSPLUS_API
81
83
94
96
97#endif
98
105U_STABLE const char * U_EXPORT2
107
114U_STABLE uint32_t U_EXPORT2
116
128U_STABLE void U_EXPORT2
129ucasemap_setLocale(UCaseMap *csm, const char *locale, UErrorCode *pErrorCode);
130
142U_STABLE void U_EXPORT2
143ucasemap_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
195U_STABLE const UBreakIterator * U_EXPORT2
197
218U_STABLE void U_EXPORT2
220
267U_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
298U_STABLE int32_t U_EXPORT2
300 char *dest, int32_t destCapacity,
301 const char *src, int32_t srcLength,
302 UErrorCode *pErrorCode);
303
327U_STABLE int32_t U_EXPORT2
329 char *dest, int32_t destCapacity,
330 const char *src, int32_t srcLength,
331 UErrorCode *pErrorCode);
332
333#if !UCONFIG_NO_BREAK_ITERATION
334
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
386
417U_STABLE int32_t U_EXPORT2
419 char *dest, int32_t destCapacity,
420 const char *src, int32_t srcLength,
421 UErrorCode *pErrorCode);
422
423#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:539
struct UBreakIterator UBreakIterator
Opaque type representing an ICU Break iterator object.
Definition: ubrk.h:26
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:45
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
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
#define U_STABLE
This is used to declare a function as a stable public ICU C API.
Definition: umachine.h:109
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:476
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition: uversion.h:130
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition: uversion.h:129