ICU 55.1  55.1
ucol.h
Go to the documentation of this file.
1 /*
2 *******************************************************************************
3 * Copyright (c) 1996-2015, International Business Machines Corporation and others.
4 * All Rights Reserved.
5 *******************************************************************************
6 */
7 
8 #ifndef UCOL_H
9 #define UCOL_H
10 
11 #include "unicode/utypes.h"
12 
13 #if !UCONFIG_NO_COLLATION
14 
15 #include "unicode/unorm.h"
16 #include "unicode/localpointer.h"
17 #include "unicode/parseerr.h"
18 #include "unicode/uloc.h"
19 #include "unicode/uset.h"
20 #include "unicode/uscript.h"
21 
52 struct UCollator;
56 typedef struct UCollator UCollator;
57 
58 
71 typedef enum {
77  UCOL_LESS = -1
79 
80 
87 typedef enum {
90 
99  UCOL_CE_STRENGTH_LIMIT,
104  UCOL_STRENGTH_LIMIT,
105 
109  UCOL_OFF = 16,
113  UCOL_ON = 17,
114 
119 
125 
126  UCOL_ATTRIBUTE_VALUE_COUNT
127 
129 
139  typedef enum {
199  UCOL_REORDER_CODE_LIMIT = 0x1005
201 
229 
234 typedef enum {
303 #ifndef U_HIDE_DEPRECATED_API
304 
316 #endif /* U_HIDE_DEPRECATED_API */
317 
342 
346 typedef enum {
362 
388 U_STABLE UCollator* U_EXPORT2
389 ucol_open(const char *loc, UErrorCode *status);
390 
416 U_STABLE UCollator* U_EXPORT2
417 ucol_openRules( const UChar *rules,
418  int32_t rulesLength,
419  UColAttributeValue normalizationMode,
420  UCollationStrength strength,
421  UParseError *parseError,
422  UErrorCode *status);
423 
424 #ifndef U_HIDE_DEPRECATED_API
425 
458 U_DEPRECATED UCollator* U_EXPORT2
459 ucol_openFromShortString( const char *definition,
460  UBool forceDefaults,
461  UParseError *parseError,
462  UErrorCode *status);
463 #endif /* U_HIDE_DEPRECATED_API */
464 
465 #ifndef U_HIDE_DEPRECATED_API
466 
479 U_DEPRECATED int32_t U_EXPORT2
481  USet *conts,
482  UErrorCode *status);
483 #endif /* U_HIDE_DEPRECATED_API */
484 
496 U_STABLE void U_EXPORT2
498  USet *contractions, USet *expansions,
499  UBool addPrefixes, UErrorCode *status);
500 
511 U_STABLE void U_EXPORT2
513 
514 #if U_SHOW_CPLUSPLUS_API
515 
517 
528 
530 
531 #endif
532 
548 U_STABLE UCollationResult U_EXPORT2
549 ucol_strcoll( const UCollator *coll,
550  const UChar *source,
551  int32_t sourceLength,
552  const UChar *target,
553  int32_t targetLength);
554 
573 U_STABLE UCollationResult U_EXPORT2
575  const UCollator *coll,
576  const char *source,
577  int32_t sourceLength,
578  const char *target,
579  int32_t targetLength,
580  UErrorCode *status);
581 
596 U_STABLE UBool U_EXPORT2
598  const UChar *source, int32_t sourceLength,
599  const UChar *target, int32_t targetLength);
600 
615 U_STABLE UBool U_EXPORT2
617  const UChar *source, int32_t sourceLength,
618  const UChar *target, int32_t targetLength);
619 
634 U_STABLE UBool U_EXPORT2
635 ucol_equal(const UCollator *coll,
636  const UChar *source, int32_t sourceLength,
637  const UChar *target, int32_t targetLength);
638 
651 U_STABLE UCollationResult U_EXPORT2
653  UCharIterator *sIter,
654  UCharIterator *tIter,
655  UErrorCode *status);
656 
666 U_STABLE UCollationStrength U_EXPORT2
668 
678 U_STABLE void U_EXPORT2
680  UCollationStrength strength);
681 
698 U_STABLE int32_t U_EXPORT2
700  int32_t* dest,
701  int32_t destCapacity,
702  UErrorCode *pErrorCode);
743 U_STABLE void U_EXPORT2
745  const int32_t* reorderCodes,
746  int32_t reorderCodesLength,
747  UErrorCode *pErrorCode);
748 
768 U_STABLE int32_t U_EXPORT2
769 ucol_getEquivalentReorderCodes(int32_t reorderCode,
770  int32_t* dest,
771  int32_t destCapacity,
772  UErrorCode *pErrorCode);
773 
786 U_STABLE int32_t U_EXPORT2
787 ucol_getDisplayName( const char *objLoc,
788  const char *dispLoc,
789  UChar *result,
790  int32_t resultLength,
791  UErrorCode *status);
792 
802 U_STABLE const char* U_EXPORT2
803 ucol_getAvailable(int32_t localeIndex);
804 
813 U_STABLE int32_t U_EXPORT2
815 
816 #if !UCONFIG_NO_SERVICE
817 
825 U_STABLE UEnumeration* U_EXPORT2
827 #endif
828 
838 U_STABLE UEnumeration* U_EXPORT2
840 
852 U_STABLE UEnumeration* U_EXPORT2
853 ucol_getKeywordValues(const char *keyword, UErrorCode *status);
854 
871 U_STABLE UEnumeration* U_EXPORT2
873  const char* locale,
874  UBool commonlyUsed,
875  UErrorCode* status);
876 
908 U_STABLE int32_t U_EXPORT2
909 ucol_getFunctionalEquivalent(char* result, int32_t resultCapacity,
910  const char* keyword, const char* locale,
911  UBool* isAvailable, UErrorCode* status);
912 
921 U_STABLE const UChar* U_EXPORT2
922 ucol_getRules( const UCollator *coll,
923  int32_t *length);
924 
925 #ifndef U_HIDE_DEPRECATED_API
926 
946 U_DEPRECATED int32_t U_EXPORT2
948  const char *locale,
949  char *buffer,
950  int32_t capacity,
951  UErrorCode *status);
952 
973 U_DEPRECATED int32_t U_EXPORT2
975  char *destination,
976  int32_t capacity,
977  UParseError *parseError,
978  UErrorCode *status);
979 #endif /* U_HIDE_DEPRECATED_API */
980 
981 
1004 U_STABLE int32_t U_EXPORT2
1006  const UChar *source,
1007  int32_t sourceLength,
1008  uint8_t *result,
1009  int32_t resultLength);
1010 
1011 
1032 U_STABLE int32_t U_EXPORT2
1034  UCharIterator *iter,
1035  uint32_t state[2],
1036  uint8_t *dest, int32_t count,
1037  UErrorCode *status);
1038 
1046 typedef enum {
1053  UCOL_BOUND_VALUE_COUNT
1054 } UColBoundMode;
1055 
1093 U_STABLE int32_t U_EXPORT2
1094 ucol_getBound(const uint8_t *source,
1095  int32_t sourceLength,
1096  UColBoundMode boundType,
1097  uint32_t noOfLevels,
1098  uint8_t *result,
1099  int32_t resultLength,
1100  UErrorCode *status);
1101 
1110 U_STABLE void U_EXPORT2
1112 
1120 U_STABLE void U_EXPORT2
1122 
1170 U_STABLE int32_t U_EXPORT2
1171 ucol_mergeSortkeys(const uint8_t *src1, int32_t src1Length,
1172  const uint8_t *src2, int32_t src2Length,
1173  uint8_t *dest, int32_t destCapacity);
1174 
1186 U_STABLE void U_EXPORT2
1188 
1200 U_STABLE UColAttributeValue U_EXPORT2
1202 
1219 U_STABLE void U_EXPORT2
1221 
1229 U_STABLE UColReorderCode U_EXPORT2
1231 
1232 #ifndef U_HIDE_DEPRECATED_API
1233 
1253 U_DEPRECATED uint32_t U_EXPORT2
1255  const UChar *varTop, int32_t len,
1256  UErrorCode *status);
1257 #endif /* U_HIDE_DEPRECATED_API */
1258 
1270 U_STABLE uint32_t U_EXPORT2 ucol_getVariableTop(const UCollator *coll, UErrorCode *status);
1271 
1285 U_DEPRECATED void U_EXPORT2
1286 ucol_restoreVariableTop(UCollator *coll, const uint32_t varTop, UErrorCode *status);
1287 
1311 U_STABLE UCollator* U_EXPORT2
1313  void *stackBuffer,
1314  int32_t *pBufferSize,
1315  UErrorCode *status);
1316 
1317 #ifndef U_HIDE_DEPRECATED_API
1318 
1322 #define U_COL_SAFECLONE_BUFFERSIZE 1
1323 
1324 #endif /* U_HIDE_DEPRECATED_API */
1325 
1341 U_STABLE int32_t U_EXPORT2
1342 ucol_getRulesEx(const UCollator *coll, UColRuleOption delta, UChar *buffer, int32_t bufferLen);
1343 
1344 #ifndef U_HIDE_DEPRECATED_API
1345 
1359 U_DEPRECATED const char * U_EXPORT2
1361 #endif /* U_HIDE_DEPRECATED_API */
1362 
1377 U_STABLE const char * U_EXPORT2
1379 
1390 U_STABLE USet * U_EXPORT2
1392 
1393 #ifndef U_HIDE_INTERNAL_API
1394 
1405 U_INTERNAL int32_t U_EXPORT2
1407  USet *unsafe,
1408  UErrorCode *status);
1409 
1430 U_INTERNAL void U_EXPORT2
1431 ucol_prepareShortStringOpen( const char *definition,
1432  UBool forceDefaults,
1433  UParseError *parseError,
1434  UErrorCode *status);
1435 #endif /* U_HIDE_INTERNAL_API */
1436 
1448 U_STABLE int32_t U_EXPORT2
1450  uint8_t *buffer, int32_t capacity,
1451  UErrorCode *status);
1452 
1470 U_STABLE UCollator* U_EXPORT2
1471 ucol_openBinary(const uint8_t *bin, int32_t length,
1472  const UCollator *base,
1473  UErrorCode *status);
1474 
1475 
1476 #endif /* #if !UCONFIG_NO_COLLATION */
1477 
1478 #endif
UCOL_IDENTICAL
@ UCOL_IDENTICAL
Identical collation strength.
Definition: ucol.h:103
UCOL_QUATERNARY
@ UCOL_QUATERNARY
Quaternary collation strength.
Definition: ucol.h:101
UCOL_EQUAL
@ UCOL_EQUAL
string a == string b
Definition: ucol.h:73
ucol_getUnsafeSet
int32_t ucol_getUnsafeSet(const UCollator *coll, USet *unsafe, UErrorCode *status)
Calculates the set of unsafe code points, given a collator.
parseerr.h
C API: Parse Error Information.
ucol_strcollUTF8
UCollationResult ucol_strcollUTF8(const UCollator *coll, const char *source, int32_t sourceLength, const char *target, int32_t targetLength, UErrorCode *status)
Compare two strings in UTF-8.
UCOL_REORDER_CODE_SPACE
@ UCOL_REORDER_CODE_SPACE
Characters with the space property.
Definition: ucol.h:163
UColAttribute
UColAttribute
Attributes that collation service understands.
Definition: ucol.h:234
ucol_restoreVariableTop
void ucol_restoreVariableTop(UCollator *coll, const uint32_t varTop, UErrorCode *status)
Sets the variable top to the specified primary weight.
utypes.h
Basic definitions for ICU, for both C and C++ APIs.
ucol_normalizeShortDefinitionString
int32_t ucol_normalizeShortDefinitionString(const char *source, char *destination, int32_t capacity, UParseError *parseError, UErrorCode *status)
Verifies and normalizes short definition string.
uscript.h
C API: Unicode Script Information.
ucol_openRules
UCollator * ucol_openRules(const UChar *rules, int32_t rulesLength, UColAttributeValue normalizationMode, UCollationStrength strength, UParseError *parseError, UErrorCode *status)
Produce a UCollator instance according to the rules supplied.
UCOL_DEFAULT
@ UCOL_DEFAULT
accepted by most attributes
Definition: ucol.h:89
ucol_greater
UBool ucol_greater(const UCollator *coll, const UChar *source, int32_t sourceLength, const UChar *target, int32_t targetLength)
Determine if one string is greater than another.
UBool
int8_t UBool
The ICU boolean type.
Definition: umachine.h:234
UCOL_DECOMPOSITION_MODE
@ UCOL_DECOMPOSITION_MODE
An alias for UCOL_NORMALIZATION_MODE attribute.
Definition: ucol.h:285
LocalUCollatorPointer
"Smart pointer" class, closes a UCollator via ucol_close().
UCOL_REORDER_CODE_DIGIT
@ UCOL_REORDER_CODE_DIGIT
Characters with the digit property.
Definition: ucol.h:193
ULocDataLocaleType
ULocDataLocaleType
Constants for *_getLocale() Allow user to select whether she wants information on requested,...
Definition: uloc.h:336
ucol_getKeywords
UEnumeration * ucol_getKeywords(UErrorCode *status)
Create a string enumerator of all possible keywords that are relevant to collation.
USCRIPT_UNKNOWN
@ USCRIPT_UNKNOWN
Definition: uscript.h:285
UCOL_LESS
@ UCOL_LESS
string a < string b
Definition: ucol.h:77
UCOL_ATTRIBUTE_COUNT
@ UCOL_ATTRIBUTE_COUNT
The number of UColAttribute constants.
Definition: ucol.h:340
UColRuleOption
UColRuleOption
Options for retrieving the rule string.
Definition: ucol.h:346
UCOL_PRIMARY
@ UCOL_PRIMARY
Primary collation strength.
Definition: ucol.h:92
ucol_getDisplayName
int32_t ucol_getDisplayName(const char *objLoc, const char *dispLoc, UChar *result, int32_t resultLength, UErrorCode *status)
Get the display name for a UCollator.
ucol_getStrength
UCollationStrength ucol_getStrength(const UCollator *coll)
Get the collation strength used in a UCollator.
U_DEPRECATED
#define U_DEPRECATED
This is used to declare a function as a deprecated public ICU C API
Definition: umachine.h:113
ucol_strcoll
UCollationResult ucol_strcoll(const UCollator *coll, const UChar *source, int32_t sourceLength, const UChar *target, int32_t targetLength)
Compare two strings.
ucol_getLocale
const char * ucol_getLocale(const UCollator *coll, ULocDataLocaleType type, UErrorCode *status)
gets the locale name of the collator.
ucol_openAvailableLocales
UEnumeration * ucol_openAvailableLocales(UErrorCode *status)
Create a string enumerator of all locales for which a valid collator may be opened.
UCOL_BOUND_LOWER
@ UCOL_BOUND_LOWER
lower bound
Definition: ucol.h:1048
ucol_nextSortKeyPart
int32_t ucol_nextSortKeyPart(const UCollator *coll, UCharIterator *iter, uint32_t state[2], uint8_t *dest, int32_t count, UErrorCode *status)
Gets the next count bytes of a sort key.
UCOL_REORDER_CODE_CURRENCY
@ UCOL_REORDER_CODE_CURRENCY
Characters with the currency property.
Definition: ucol.h:187
UCOL_REORDER_CODE_SYMBOL
@ UCOL_REORDER_CODE_SYMBOL
Characters with the symbol property.
Definition: ucol.h:181
UColAttributeValue
UColAttributeValue
Enum containing attribute values for controling collation behavior.
Definition: ucol.h:87
ucol_getAvailable
const char * ucol_getAvailable(int32_t localeIndex)
Get a locale for which collation rules are available.
UCollationResult
UCollationResult
UCOL_LESS is returned if source string is compared to be less than target string in the ucol_strcoll(...
Definition: ucol.h:71
UParseError
A UParseError struct is used to returned detailed information about parsing errors.
Definition: parseerr.h:56
UCOL_SECONDARY
@ UCOL_SECONDARY
Secondary collation strength.
Definition: ucol.h:94
UCOL_REORDER_CODE_OTHERS
@ UCOL_REORDER_CODE_OTHERS
A special reordering code that is used to specify all other codes used for reordering except for the ...
Definition: ucol.h:157
ucol_close
void ucol_close(UCollator *coll)
Close a UCollator.
ucol_strcollIter
UCollationResult ucol_strcollIter(const UCollator *coll, UCharIterator *sIter, UCharIterator *tIter, UErrorCode *status)
Compare two UTF-8 encoded trings.
uloc.h
C API: Locale.
ucol_setAttribute
void ucol_setAttribute(UCollator *coll, UColAttribute attr, UColAttributeValue value, UErrorCode *status)
Universal attribute setter.
ucol_getContractions
int32_t ucol_getContractions(const UCollator *coll, USet *conts, UErrorCode *status)
Get a set containing the contractions defined by the collator.
UCOL_CASE_FIRST
@ UCOL_CASE_FIRST
Controls the ordering of upper and lower case letters.
Definition: ucol.h:261
ucol_getVersion
void ucol_getVersion(const UCollator *coll, UVersionInfo info)
Gets the version information for a Collator.
UErrorCode
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers,...
Definition: utypes.h:476
ucol_openBinary
UCollator * ucol_openBinary(const uint8_t *bin, int32_t length, const UCollator *base, UErrorCode *status)
Opens a collator from a collator binary image created using ucol_cloneBinary.
ucol_setVariableTop
uint32_t ucol_setVariableTop(UCollator *coll, const UChar *varTop, int32_t len, UErrorCode *status)
Sets the variable top to the primary weight of the specified string.
ucol_getKeywordValuesForLocale
UEnumeration * ucol_getKeywordValuesForLocale(const char *key, const char *locale, UBool commonlyUsed, UErrorCode *status)
Given a key and a locale, returns an array of string values in a preferred order that would make a di...
UCOL_NON_IGNORABLE
@ UCOL_NON_IGNORABLE
Valid for UCOL_ALTERNATE_HANDLING.
Definition: ucol.h:118
UCOL_REORDER_CODE_DEFAULT
@ UCOL_REORDER_CODE_DEFAULT
A special reordering code that is used to specify the default reordering codes for a locale.
Definition: ucol.h:145
UCOL_DEFAULT_STRENGTH
@ UCOL_DEFAULT_STRENGTH
Default collation strength.
Definition: ucol.h:98
U_INTERNAL
#define U_INTERNAL
This is used to declare a function as an internal ICU C API
Definition: umachine.h:117
UCOL_LOWER_FIRST
@ UCOL_LOWER_FIRST
Valid for UCOL_CASE_FIRST - lower case sorts before upper case.
Definition: ucol.h:122
UColBoundMode
UColBoundMode
enum that is taken by ucol_getBound API See below for explanation do not change the values assigned...
Definition: ucol.h:1046
ucol_getKeywordValues
UEnumeration * ucol_getKeywordValues(const char *keyword, UErrorCode *status)
Given a keyword, create a string enumeration of all values for that keyword that are currently in use...
ucol_open
UCollator * ucol_open(const char *loc, UErrorCode *status)
Open a UCollator for comparing strings.
ucol_getReorderCodes
int32_t ucol_getReorderCodes(const UCollator *coll, int32_t *dest, int32_t destCapacity, UErrorCode *pErrorCode)
Retrieves the reordering codes for this collator.
UCollator
struct UCollator UCollator
structure representing a collator object instance
Definition: ucol.h:56
ucol_getMaxVariable
UColReorderCode ucol_getMaxVariable(const UCollator *coll)
Returns the maximum reordering group whose characters are affected by UCOL_ALTERNATE_HANDLING.
UCOL_REORDER_CODE_PUNCTUATION
@ UCOL_REORDER_CODE_PUNCTUATION
Characters with the punctuation property.
Definition: ucol.h:175
ucol_getBound
int32_t ucol_getBound(const uint8_t *source, int32_t sourceLength, UColBoundMode boundType, uint32_t noOfLevels, uint8_t *result, int32_t resultLength, UErrorCode *status)
Produce a bound for a given sortkey and a number of levels.
ucol_openFromShortString
UCollator * ucol_openFromShortString(const char *definition, UBool forceDefaults, UParseError *parseError, UErrorCode *status)
Open a collator defined by a short form string.
ucol_getRulesEx
int32_t ucol_getRulesEx(const UCollator *coll, UColRuleOption delta, UChar *buffer, int32_t bufferLen)
Returns current rules.
UCOL_REORDER_CODE_NONE
@ UCOL_REORDER_CODE_NONE
A special reordering code that is used to specify no reordering codes.
Definition: ucol.h:150
ucol_getShortDefinitionString
int32_t ucol_getShortDefinitionString(const UCollator *coll, const char *locale, char *buffer, int32_t capacity, UErrorCode *status)
Get the short definition string for a collator.
UCOL_STRENGTH
@ UCOL_STRENGTH
The strength attribute.
Definition: ucol.h:302
ucol_getRules
const UChar * ucol_getRules(const UCollator *coll, int32_t *length)
Get the collation tailoring rules from a UCollator.
UCOL_ALTERNATE_HANDLING
@ UCOL_ALTERNATE_HANDLING
Attribute for handling variable elements.
Definition: ucol.h:252
ucol_cloneBinary
int32_t ucol_cloneBinary(const UCollator *coll, uint8_t *buffer, int32_t capacity, UErrorCode *status)
Creates a binary image of a collator.
U_DEFINE_LOCAL_OPEN_POINTER
#define U_DEFINE_LOCAL_OPEN_POINTER(LocalPointerClassName, Type, closeFunction)
"Smart pointer" definition macro, deletes objects via the closeFunction.
Definition: localpointer.h:356
ucol_getFunctionalEquivalent
int32_t ucol_getFunctionalEquivalent(char *result, int32_t resultCapacity, const char *keyword, const char *locale, UBool *isAvailable, UErrorCode *status)
Return the functionally equivalent locale for the specified input locale, with respect to given keywo...
ucol_countAvailable
int32_t ucol_countAvailable(void)
Determine how many locales have collation rules available.
UCOL_HIRAGANA_QUATERNARY_MODE
@ UCOL_HIRAGANA_QUATERNARY_MODE
When turned on, this attribute positions Hiragana before all non-ignorables on quaternary level Thi...
Definition: ucol.h:315
ucol_setStrength
void ucol_setStrength(UCollator *coll, UCollationStrength strength)
Set the collation strength used in a UCollator.
UCOL_OFF
@ UCOL_OFF
Turn the feature off - works for UCOL_FRENCH_COLLATION, UCOL_CASE_LEVEL, UCOL_HIRAGANA_QUATERNARY_MOD...
Definition: ucol.h:109
ucol_mergeSortkeys
int32_t ucol_mergeSortkeys(const uint8_t *src1, int32_t src1Length, const uint8_t *src2, int32_t src2Length, uint8_t *dest, int32_t destCapacity)
Merges two sort keys.
unorm.h
C API: Unicode Normalization.
ucol_safeClone
UCollator * ucol_safeClone(const UCollator *coll, void *stackBuffer, int32_t *pBufferSize, UErrorCode *status)
Thread safe cloning operation.
UCharIterator
C API for code unit iteration.
Definition: uiter.h:339
UCOL_BOUND_UPPER
@ UCOL_BOUND_UPPER
upper bound that will match strings of exact size
Definition: ucol.h:1050
uset.h
C API: Unicode Set.
UCOL_FRENCH_COLLATION
@ UCOL_FRENCH_COLLATION
Attribute for direction of secondary weights - used in Canadian French.
Definition: ucol.h:241
UCOL_NUMERIC_COLLATION
@ UCOL_NUMERIC_COLLATION
When turned on, this attribute makes substrings of digits sort according to their numeric values.
Definition: ucol.h:335
localpointer.h
C++ API: "Smart pointers" for use with and in ICU4C C++ code.
UCOL_REORDER_CODE_LIMIT
@ UCOL_REORDER_CODE_LIMIT
The limit of the reorder codes.
Definition: ucol.h:199
ucol_setMaxVariable
void ucol_setMaxVariable(UCollator *coll, UColReorderCode group, UErrorCode *pErrorCode)
Sets the variable top to the top of the specified reordering group.
UCOL_CASE_LEVEL
@ UCOL_CASE_LEVEL
Controls whether an extra case level (positioned before the third level) is generated or not.
Definition: ucol.h:271
UCOL_TERTIARY
@ UCOL_TERTIARY
Tertiary collation strength.
Definition: ucol.h:96
U_STABLE
#define U_STABLE
This is used to declare a function as a stable public ICU C API.
Definition: umachine.h:109
UCOL_FULL_RULES
@ UCOL_FULL_RULES
Retrieves the "UCA rules" concatenated with the tailoring rules.
Definition: ucol.h:360
ucol_getVariableTop
uint32_t ucol_getVariableTop(const UCollator *coll, UErrorCode *status)
Gets the variable top value of a Collator.
UCOL_UPPER_FIRST
@ UCOL_UPPER_FIRST
upper case sorts before lower case
Definition: ucol.h:124
UCOL_REORDER_CODE_FIRST
@ UCOL_REORDER_CODE_FIRST
The first entry in the enumeration of reordering groups.
Definition: ucol.h:169
ucol_getAttribute
UColAttributeValue ucol_getAttribute(const UCollator *coll, UColAttribute attr, UErrorCode *status)
Universal attribute getter.
UChar
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
ucol_getUCAVersion
void ucol_getUCAVersion(const UCollator *coll, UVersionInfo info)
Gets the UCA version information for a Collator.
UVersionInfo
uint8_t UVersionInfo[U_MAX_VERSION_LENGTH]
The binary form of a version on ICU APIs is an array of 4 uint8_t.
Definition: uversion.h:57
ucol_getSortKey
int32_t ucol_getSortKey(const UCollator *coll, const UChar *source, int32_t sourceLength, uint8_t *result, int32_t resultLength)
Get a sort key for a string from a UCollator.
USet
struct USet USet
Definition: ucnv.h:67
ucol_greaterOrEqual
UBool ucol_greaterOrEqual(const UCollator *coll, const UChar *source, int32_t sourceLength, const UChar *target, int32_t targetLength)
Determine if one string is greater than or equal to another.
UEnumeration
struct UEnumeration UEnumeration
structure representing an enumeration object instance
Definition: uenum.h:39
UCOL_ON
@ UCOL_ON
Turn the feature on - works for UCOL_FRENCH_COLLATION, UCOL_CASE_LEVEL, UCOL_HIRAGANA_QUATERNARY_MODE...
Definition: ucol.h:113
ucol_prepareShortStringOpen
void ucol_prepareShortStringOpen(const char *definition, UBool forceDefaults, UParseError *parseError, UErrorCode *status)
Touches all resources needed for instantiating a collator from a short string definition,...
U_NAMESPACE_END
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition: uversion.h:130
ucol_equal
UBool ucol_equal(const UCollator *coll, const UChar *source, int32_t sourceLength, const UChar *target, int32_t targetLength)
Compare two strings for equality.
U_NAMESPACE_BEGIN
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition: uversion.h:129
UCOL_TAILORING_ONLY
@ UCOL_TAILORING_ONLY
Retrieves the tailoring rules only.
Definition: ucol.h:352
ucol_getEquivalentReorderCodes
int32_t ucol_getEquivalentReorderCodes(int32_t reorderCode, int32_t *dest, int32_t destCapacity, UErrorCode *pErrorCode)
Retrieves the reorder codes that are grouped with the given reorder code.
ucol_getLocaleByType
const char * ucol_getLocaleByType(const UCollator *coll, ULocDataLocaleType type, UErrorCode *status)
gets the locale name of the collator.
UCOL_BOUND_UPPER_LONG
@ UCOL_BOUND_UPPER_LONG
upper bound that will match all the strings that have the same initial substring as the given string
Definition: ucol.h:1052
UCOL_NORMALIZATION_MODE
@ UCOL_NORMALIZATION_MODE
Controls whether the normalization check and necessary normalizations are performed.
Definition: ucol.h:281
ucol_getContractionsAndExpansions
void ucol_getContractionsAndExpansions(const UCollator *coll, USet *contractions, USet *expansions, UBool addPrefixes, UErrorCode *status)
Get a set containing the expansions defined by the collator.
UCOL_GREATER
@ UCOL_GREATER
string a > string b
Definition: ucol.h:75
UColReorderCode
UColReorderCode
Enum containing the codes for reordering segments of the collation table that are not script codes.
Definition: ucol.h:139
ucol_getTailoredSet
USet * ucol_getTailoredSet(const UCollator *coll, UErrorCode *status)
Get a Unicode set that contains all the characters and sequences tailored in this collator.
ucol_setReorderCodes
void ucol_setReorderCodes(UCollator *coll, const int32_t *reorderCodes, int32_t reorderCodesLength, UErrorCode *pErrorCode)
Sets the reordering codes for this collator.
UCOL_SHIFTED
@ UCOL_SHIFTED
Valid for UCOL_ALTERNATE_HANDLING.
Definition: ucol.h:116
UCollationStrength
UColAttributeValue UCollationStrength
Base letter represents a primary difference.
Definition: ucol.h:228