ICU 63.1 63.1

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
112 U_STABLE UCollationElements* U_EXPORT2
113 ucol_openElements(const UCollator *coll,
114 const UChar *text,
115 int32_t textLength,
116 UErrorCode *status);
117
118
126 U_STABLE int32_t U_EXPORT2
127 ucol_keyHashCode(const uint8_t* key, int32_t length);
128
135 U_STABLE void U_EXPORT2
136 ucol_closeElements(UCollationElements *elems);
137
147 U_STABLE void U_EXPORT2
148 ucol_reset(UCollationElements *elems);
149
159 U_STABLE int32_t U_EXPORT2
160 ucol_next(UCollationElements *elems, UErrorCode *status);
161
175 U_STABLE int32_t U_EXPORT2
176 ucol_previous(UCollationElements *elems, UErrorCode *status);
177
189 U_STABLE int32_t U_EXPORT2
190 ucol_getMaxExpansion(const UCollationElements *elems, int32_t order);
191
204 U_STABLE void U_EXPORT2
205 ucol_setText( UCollationElements *elems,
206 const UChar *text,
207 int32_t textLength,
208 UErrorCode *status);
209
219 U_STABLE int32_t U_EXPORT2
220 ucol_getOffset(const UCollationElements *elems);
221
234 U_STABLE void U_EXPORT2
235 ucol_setOffset(UCollationElements *elems,
236 int32_t offset,
237 UErrorCode *status);
238
245 U_STABLE int32_t U_EXPORT2
246 ucol_primaryOrder (int32_t order);
247
254 U_STABLE int32_t U_EXPORT2
255 ucol_secondaryOrder (int32_t order);
256
263 U_STABLE int32_t U_EXPORT2
264 ucol_tertiaryOrder (int32_t order);
265
266 #endif /* #if !UCONFIG_NO_COLLATION */
267
268 #endif
ucol_tertiaryOrder
int32_t ucol_tertiaryOrder(int32_t order)
Get the tertiary order of a collation order.
ucol_openElements
UCollationElements * ucol_openElements(const UCollator *coll, const UChar *text, int32_t textLength, UErrorCode *status)
Open the collation elements for a string.
ucol_secondaryOrder
int32_t ucol_secondaryOrder(int32_t order)
Get the secondary order of a collation order.
ucol_previous
int32_t ucol_previous(UCollationElements *elems, UErrorCode *status)
Get the ordering priority of the previous collation element in the text.
ucol_getMaxExpansion
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_keyHashCode
int32_t ucol_keyHashCode(const uint8_t *key, int32_t length)
get a hash code for a key...
UCollationElements
struct UCollationElements UCollationElements
The UCollationElements struct.
Definition: ucoleitr.h:39
ucol_setText
void ucol_setText(UCollationElements *elems, const UChar *text, int32_t textLength, UErrorCode *status)
Set the text containing the collation elements.
ucol.h
C API: Collator.
ucol_next
int32_t ucol_next(UCollationElements *elems, UErrorCode *status)
Get the ordering priority of the next collation element in the text.
UChar
uint16_t UChar
The base type for UTF-16 code units and pointers.
Definition: umachine.h:342
ucol_closeElements
void ucol_closeElements(UCollationElements *elems)
Close a UCollationElements.
ucol_setOffset
void ucol_setOffset(UCollationElements *elems, int32_t offset, UErrorCode *status)
Set the offset of the current source character.
ucol_reset
void ucol_reset(UCollationElements *elems)
Reset the collation elements to their initial state.
UErrorCode
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
Definition: utypes.h:401
UCollator
struct UCollator UCollator
structure representing a collator object instance
Definition: ucol.h:58
utypes.h
Basic definitions for ICU, for both C and C++ APIs.
ucol_getOffset
int32_t ucol_getOffset(const UCollationElements *elems)
Get the offset of the current source character.
ucol_primaryOrder
int32_t ucol_primaryOrder(int32_t order)
Get the primary order of a collation order.
U_STABLE
#define U_STABLE
This is used to declare a function as a stable public ICU C API.
Definition: umachine.h:111