ICU 4.2.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ucasemap.h
Go to the documentation of this file.
1 /*
2 *******************************************************************************
3 *
4 * Copyright (C) 2005-2009, 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 
43 struct UCaseMap;
44 typedef struct UCaseMap UCaseMap;
69 ucasemap_open(const char *locale, uint32_t options, UErrorCode *pErrorCode);
70 
78 
85 U_STABLE const char * U_EXPORT2
86 ucasemap_getLocale(const UCaseMap *csm);
87 
95 ucasemap_getOptions(const UCaseMap *csm);
96 
108 U_STABLE void U_EXPORT2
109 ucasemap_setLocale(UCaseMap *csm, const char *locale, UErrorCode *pErrorCode);
110 
122 U_STABLE void U_EXPORT2
123 ucasemap_setOptions(UCaseMap *csm, uint32_t options, UErrorCode *pErrorCode);
124 
139 #define U_TITLECASE_NO_LOWERCASE 0x100
140 
164 #define U_TITLECASE_NO_BREAK_ADJUSTMENT 0x200
165 
166 #if !UCONFIG_NO_BREAK_ITERATION
167 
177 
198 U_DRAFT void U_EXPORT2
199 ucasemap_setBreakIterator(UCaseMap *csm, UBreakIterator *iterToAdopt, UErrorCode *pErrorCode);
200 
249  UChar *dest, int32_t destCapacity,
250  const UChar *src, int32_t srcLength,
251  UErrorCode *pErrorCode);
252 
253 #endif
254 
279 ucasemap_utf8ToLower(const UCaseMap *csm,
280  char *dest, int32_t destCapacity,
281  const char *src, int32_t srcLength,
282  UErrorCode *pErrorCode);
283 
308 ucasemap_utf8ToUpper(const UCaseMap *csm,
309  char *dest, int32_t destCapacity,
310  const char *src, int32_t srcLength,
311  UErrorCode *pErrorCode);
312 
313 #if !UCONFIG_NO_BREAK_ITERATION
314 
361  char *dest, int32_t destCapacity,
362  const char *src, int32_t srcLength,
363  UErrorCode *pErrorCode);
364 
365 #endif
366 
397  char *dest, int32_t destCapacity,
398  const char *src, int32_t srcLength,
399  UErrorCode *pErrorCode);
400 
401 #endif
int32_t ucasemap_utf8ToTitle(UCaseMap *csm, char *dest, int32_t destCapacity, const char *src, int32_t srcLength, UErrorCode *pErrorCode)
Titlecase a UTF-8 string.
int32_t ucasemap_utf8FoldCase(const UCaseMap *csm, char *dest, int32_t destCapacity, const char *src, int32_t srcLength, UErrorCode *pErrorCode)
Case-fold the characters in a UTF-8 string.
struct UCaseMap UCaseMap
C typedef for struct UCaseMap.
Definition: ucasemap.h:44
void UBreakIterator
Opaque type representing an ICU Break iterator object.
Definition: ubrk.h:25
unsigned int uint32_t
Define 64 bit limits.
Definition: pwin32.h:147
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.
const char * ucasemap_getLocale(const UCaseMap *csm)
Get the locale ID that is used for language-dependent case mappings.
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.
#define U_EXPORT2
Definition: platform.h:338
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 wchar_t if that is 16 bits wide; always assumed to be unsigned.
Definition: umachine.h:299
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:593
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.
#define U_DRAFT
This is used to declare a function as a draft public ICU C API.
Definition: umachine.h:119
void ucasemap_setOptions(UCaseMap *csm, uint32_t options, UErrorCode *pErrorCode)
Set the options bit set that is used for case folding and string comparisons.
signed int int32_t
Define 64 bit limits.
Definition: pwin32.h:143
#define U_STABLE
This is used to declare a function as a stable public ICU C API.
Definition: umachine.h:117