ICU 78.2 78.2

ucoleitr.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 * Copyright (C) 2001-2014, International Business Machines
6 * Corporation and others. All Rights Reserved.
7 *******************************************************************************
8 *
9 * File ucoleitr.h
10 *
11 * Modification History:
12 *
13 * Date Name Description
14 * 02/15/2001 synwee Modified all methods to process its own function
15 * instead of calling the equivalent c++ api (coleitr.h)
16 *******************************************************************************/
17
18 #ifndef UCOLEITR_H
19 #define UCOLEITR_H
20
21 #include "unicode/utypes.h"
22
23 #if !UCONFIG_NO_COLLATION
24
30 #define UCOL_NULLORDER ((int32_t)0xFFFFFFFF)
31
32 #include "unicode/ucol.h"
33
39 typedef struct UCollationElements UCollationElements;
40
116 U_CAPI UCollationElements* U_EXPORT2
117 ucol_openElements(const UCollator *coll,
118 const UChar *text,
119 int32_t textLength,
120 UErrorCode *status);
121
129 U_CAPI int32_t U_EXPORT2
130 ucol_keyHashCode(const uint8_t* key, int32_t length);
131
138 U_CAPI void U_EXPORT2
139 ucol_closeElements(UCollationElements *elems);
140
150 U_CAPI void U_EXPORT2
151 ucol_reset(UCollationElements *elems);
152
162 U_CAPI int32_t U_EXPORT2
163 ucol_next(UCollationElements *elems, UErrorCode *status);
164
178 U_CAPI int32_t U_EXPORT2
179 ucol_previous(UCollationElements *elems, UErrorCode *status);
180
192 U_CAPI int32_t U_EXPORT2
193 ucol_getMaxExpansion(const UCollationElements *elems, int32_t order);
194
212 U_CAPI void U_EXPORT2
213 ucol_setText( UCollationElements *elems,
214 const UChar *text,
215 int32_t textLength,
216 UErrorCode *status);
217
227 U_CAPI int32_t U_EXPORT2
228 ucol_getOffset(const UCollationElements *elems);
229
242 U_CAPI void U_EXPORT2
243 ucol_setOffset(UCollationElements *elems,
244 int32_t offset,
245 UErrorCode *status);
246
253 U_CAPI int32_t U_EXPORT2
254 ucol_primaryOrder (int32_t order);
255
262 U_CAPI int32_t U_EXPORT2
263 ucol_secondaryOrder (int32_t order);
264
271 U_CAPI int32_t U_EXPORT2
272 ucol_tertiaryOrder (int32_t order);
273
274 #endif /* #if !UCONFIG_NO_COLLATION */
275
276 #endif
ucol.h
C API: Collator.
UCollator
struct UCollator UCollator
structure representing a collator object instance
Definition: ucol.h:61
ucol_next
U_CAPI int32_t ucol_next(UCollationElements *elems, UErrorCode *status)
Get the ordering priority of the next collation element in the text.
ucol_primaryOrder
U_CAPI int32_t ucol_primaryOrder(int32_t order)
Get the primary order of a collation order.
ucol_setText
U_CAPI void ucol_setText(UCollationElements *elems, const UChar *text, int32_t textLength, UErrorCode *status)
Set the text containing the collation elements.
ucol_tertiaryOrder
U_CAPI int32_t ucol_tertiaryOrder(int32_t order)
Get the tertiary order of a collation order.
ucol_reset
U_CAPI void ucol_reset(UCollationElements *elems)
Reset the collation elements to their initial state.
UCollationElements
struct UCollationElements UCollationElements
The UCollationElements struct.
Definition: ucoleitr.h:39
ucol_getOffset
U_CAPI int32_t ucol_getOffset(const UCollationElements *elems)
Get the offset of the current source character.
ucol_getMaxExpansion
U_CAPI int32_t ucol_getMaxExpansion(const UCollationElements *elems, int32_t order)
Get the maximum length of any expansion sequences that end with the specified comparison order.
ucol_openElements
U_CAPI UCollationElements * ucol_openElements(const UCollator *coll, const UChar *text, int32_t textLength, UErrorCode *status)
Open the collation elements for a string.
ucol_previous
U_CAPI int32_t ucol_previous(UCollationElements *elems, UErrorCode *status)
Get the ordering priority of the previous collation element in the text.
ucol_secondaryOrder
U_CAPI int32_t ucol_secondaryOrder(int32_t order)
Get the secondary order of a collation order.
ucol_setOffset
U_CAPI void ucol_setOffset(UCollationElements *elems, int32_t offset, UErrorCode *status)
Set the offset of the current source character.
ucol_closeElements
U_CAPI void ucol_closeElements(UCollationElements *elems)
Close a UCollationElements.
ucol_keyHashCode
U_CAPI int32_t ucol_keyHashCode(const uint8_t *key, int32_t length)
get a hash code for a key...
U_CAPI
#define U_CAPI
This is used to declare a function as a public ICU C API.
Definition: umachine.h:110
UChar
char16_t UChar
The base type for UTF-16 code units and pointers.
Definition: umachine.h:400
utypes.h
Basic definitions for ICU, for both C and C++ APIs.
UErrorCode
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.
Definition: utypes.h:509