ICU 74.2  74.2
ucol.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) 1996-2015, International Business Machines Corporation and others.
6 * All Rights Reserved.
7 *******************************************************************************
8 */
9 
10 #ifndef UCOL_H
11 #define UCOL_H
12 
13 #include "unicode/utypes.h"
14 
15 #if !UCONFIG_NO_COLLATION
16 
17 #include "unicode/unorm.h"
18 #include "unicode/parseerr.h"
19 #include "unicode/uloc.h"
20 #include "unicode/uset.h"
21 #include "unicode/uscript.h"
22 
23 #if U_SHOW_CPLUSPLUS_API
24 #include "unicode/localpointer.h"
25 #endif // U_SHOW_CPLUSPLUS_API
26 
57 struct UCollator;
61 typedef struct UCollator UCollator;
62 
63 
76 typedef enum {
82  UCOL_LESS = -1
84 
85 
92 typedef enum {
95 
104  UCOL_CE_STRENGTH_LIMIT,
109  UCOL_STRENGTH_LIMIT,
110 
114  UCOL_OFF = 16,
118  UCOL_ON = 17,
119 
124 
130 
131 #ifndef U_HIDE_DEPRECATED_API
132 
137 #endif /* U_HIDE_DEPRECATED_API */
139 
149  typedef enum {
204 #ifndef U_HIDE_DEPRECATED_API
205 
210 #endif /* U_HIDE_DEPRECATED_API */
212 
240 
245 typedef enum {
324 #ifndef U_HIDE_DEPRECATED_API
325 
337 #endif /* U_HIDE_DEPRECATED_API */
338 
357 
358  /* Do not conditionalize the following with #ifndef U_HIDE_DEPRECATED_API,
359  * it is needed for layout of RuleBasedCollator object. */
360 #ifndef U_FORCE_HIDE_DEPRECATED_API
361 
366 #endif // U_FORCE_HIDE_DEPRECATED_API
367 } UColAttribute;
368 
372 typedef enum {
387 } UColRuleOption ;
388 
414 U_CAPI UCollator* U_EXPORT2
415 ucol_open(const char *loc, UErrorCode *status);
416 
442 U_CAPI UCollator* U_EXPORT2
443 ucol_openRules( const UChar *rules,
444  int32_t rulesLength,
445  UColAttributeValue normalizationMode,
446  UCollationStrength strength,
447  UParseError *parseError,
448  UErrorCode *status);
449 
450 #ifndef U_HIDE_DEPRECATED_API
451 
484 U_DEPRECATED UCollator* U_EXPORT2
485 ucol_openFromShortString( const char *definition,
486  UBool forceDefaults,
487  UParseError *parseError,
488  UErrorCode *status);
489 #endif /* U_HIDE_DEPRECATED_API */
490 
491 #ifndef U_HIDE_DEPRECATED_API
492 
505 U_DEPRECATED int32_t U_EXPORT2
506 ucol_getContractions( const UCollator *coll,
507  USet *conts,
508  UErrorCode *status);
509 #endif /* U_HIDE_DEPRECATED_API */
510 
522 U_CAPI void U_EXPORT2
524  USet *contractions, USet *expansions,
525  UBool addPrefixes, UErrorCode *status);
526 
537 U_CAPI void U_EXPORT2
538 ucol_close(UCollator *coll);
539 
540 #if U_SHOW_CPLUSPLUS_API
541 
542 U_NAMESPACE_BEGIN
543 
554 
555 U_NAMESPACE_END
556 
557 #endif
558 
574 U_CAPI UCollationResult U_EXPORT2
575 ucol_strcoll( const UCollator *coll,
576  const UChar *source,
577  int32_t sourceLength,
578  const UChar *target,
579  int32_t targetLength);
580 
599 U_CAPI UCollationResult U_EXPORT2
601  const UCollator *coll,
602  const char *source,
603  int32_t sourceLength,
604  const char *target,
605  int32_t targetLength,
606  UErrorCode *status);
607 
622 U_CAPI UBool U_EXPORT2
623 ucol_greater(const UCollator *coll,
624  const UChar *source, int32_t sourceLength,
625  const UChar *target, int32_t targetLength);
626 
641 U_CAPI UBool U_EXPORT2
642 ucol_greaterOrEqual(const UCollator *coll,
643  const UChar *source, int32_t sourceLength,
644  const UChar *target, int32_t targetLength);
645 
660 U_CAPI UBool U_EXPORT2
661 ucol_equal(const UCollator *coll,
662  const UChar *source, int32_t sourceLength,
663  const UChar *target, int32_t targetLength);
664 
677 U_CAPI UCollationResult U_EXPORT2
678 ucol_strcollIter( const UCollator *coll,
679  UCharIterator *sIter,
680  UCharIterator *tIter,
681  UErrorCode *status);
682 
692 U_CAPI UCollationStrength U_EXPORT2
693 ucol_getStrength(const UCollator *coll);
694 
704 U_CAPI void U_EXPORT2
706  UCollationStrength strength);
707 
724 U_CAPI int32_t U_EXPORT2
725 ucol_getReorderCodes(const UCollator* coll,
726  int32_t* dest,
727  int32_t destCapacity,
728  UErrorCode *pErrorCode);
769 U_CAPI void U_EXPORT2
771  const int32_t* reorderCodes,
772  int32_t reorderCodesLength,
773  UErrorCode *pErrorCode);
774 
794 U_CAPI int32_t U_EXPORT2
795 ucol_getEquivalentReorderCodes(int32_t reorderCode,
796  int32_t* dest,
797  int32_t destCapacity,
798  UErrorCode *pErrorCode);
799 
812 U_CAPI int32_t U_EXPORT2
813 ucol_getDisplayName( const char *objLoc,
814  const char *dispLoc,
815  UChar *result,
816  int32_t resultLength,
817  UErrorCode *status);
818 
828 U_CAPI const char* U_EXPORT2
829 ucol_getAvailable(int32_t localeIndex);
830 
839 U_CAPI int32_t U_EXPORT2
840 ucol_countAvailable(void);
841 
842 #if !UCONFIG_NO_SERVICE
843 
851 U_CAPI UEnumeration* U_EXPORT2
853 #endif
854 
864 U_CAPI UEnumeration* U_EXPORT2
866 
878 U_CAPI UEnumeration* U_EXPORT2
879 ucol_getKeywordValues(const char *keyword, UErrorCode *status);
880 
897 U_CAPI UEnumeration* U_EXPORT2
898 ucol_getKeywordValuesForLocale(const char* key,
899  const char* locale,
900  UBool commonlyUsed,
901  UErrorCode* status);
902 
934 U_CAPI int32_t U_EXPORT2
935 ucol_getFunctionalEquivalent(char* result, int32_t resultCapacity,
936  const char* keyword, const char* locale,
937  UBool* isAvailable, UErrorCode* status);
938 
947 U_CAPI const UChar* U_EXPORT2
948 ucol_getRules( const UCollator *coll,
949  int32_t *length);
950 
951 #ifndef U_HIDE_DEPRECATED_API
952 
972 U_DEPRECATED int32_t U_EXPORT2
974  const char *locale,
975  char *buffer,
976  int32_t capacity,
977  UErrorCode *status);
978 
998 U_DEPRECATED int32_t U_EXPORT2
999 ucol_normalizeShortDefinitionString(const char *source,
1000  char *destination,
1001  int32_t capacity,
1002  UParseError *parseError,
1003  UErrorCode *status);
1004 #endif /* U_HIDE_DEPRECATED_API */
1005 
1006 
1029 U_CAPI int32_t U_EXPORT2
1030 ucol_getSortKey(const UCollator *coll,
1031  const UChar *source,
1032  int32_t sourceLength,
1033  uint8_t *result,
1034  int32_t resultLength);
1035 
1036 
1057 U_CAPI int32_t U_EXPORT2
1058 ucol_nextSortKeyPart(const UCollator *coll,
1059  UCharIterator *iter,
1060  uint32_t state[2],
1061  uint8_t *dest, int32_t count,
1062  UErrorCode *status);
1063 
1071 typedef enum {
1078 #ifndef U_HIDE_DEPRECATED_API
1079 
1084 #endif /* U_HIDE_DEPRECATED_API */
1085 } UColBoundMode;
1086 
1124 U_CAPI int32_t U_EXPORT2
1125 ucol_getBound(const uint8_t *source,
1126  int32_t sourceLength,
1127  UColBoundMode boundType,
1128  uint32_t noOfLevels,
1129  uint8_t *result,
1130  int32_t resultLength,
1131  UErrorCode *status);
1132 
1141 U_CAPI void U_EXPORT2
1142 ucol_getVersion(const UCollator* coll, UVersionInfo info);
1143 
1151 U_CAPI void U_EXPORT2
1152 ucol_getUCAVersion(const UCollator* coll, UVersionInfo info);
1153 
1201 U_CAPI int32_t U_EXPORT2
1202 ucol_mergeSortkeys(const uint8_t *src1, int32_t src1Length,
1203  const uint8_t *src2, int32_t src2Length,
1204  uint8_t *dest, int32_t destCapacity);
1205 
1217 U_CAPI void U_EXPORT2
1219 
1231 U_CAPI UColAttributeValue U_EXPORT2
1232 ucol_getAttribute(const UCollator *coll, UColAttribute attr, UErrorCode *status);
1233 
1250 U_CAPI void U_EXPORT2
1251 ucol_setMaxVariable(UCollator *coll, UColReorderCode group, UErrorCode *pErrorCode);
1252 
1260 U_CAPI UColReorderCode U_EXPORT2
1261 ucol_getMaxVariable(const UCollator *coll);
1262 
1263 #ifndef U_HIDE_DEPRECATED_API
1264 
1284 U_DEPRECATED uint32_t U_EXPORT2
1286  const UChar *varTop, int32_t len,
1287  UErrorCode *status);
1288 #endif /* U_HIDE_DEPRECATED_API */
1289 
1301 U_CAPI uint32_t U_EXPORT2 ucol_getVariableTop(const UCollator *coll, UErrorCode *status);
1302 
1303 #ifndef U_HIDE_DEPRECATED_API
1304 
1318 U_DEPRECATED void U_EXPORT2
1319 ucol_restoreVariableTop(UCollator *coll, const uint32_t varTop, UErrorCode *status);
1320 #endif /* U_HIDE_DEPRECATED_API */
1321 
1332 U_CAPI UCollator* U_EXPORT2 ucol_clone(const UCollator *coll, UErrorCode *status);
1333 
1334 #ifndef U_HIDE_DEPRECATED_API
1335 
1359 U_DEPRECATED UCollator* U_EXPORT2
1360 ucol_safeClone(const UCollator *coll,
1361  void *stackBuffer,
1362  int32_t *pBufferSize,
1363  UErrorCode *status);
1364 
1365 
1369 #define U_COL_SAFECLONE_BUFFERSIZE 1
1370 
1371 #endif /* U_HIDE_DEPRECATED_API */
1372 
1388 U_CAPI int32_t U_EXPORT2
1389 ucol_getRulesEx(const UCollator *coll, UColRuleOption delta, UChar *buffer, int32_t bufferLen);
1390 
1391 #ifndef U_HIDE_DEPRECATED_API
1392 
1406 U_DEPRECATED const char * U_EXPORT2
1407 ucol_getLocale(const UCollator *coll, ULocDataLocaleType type, UErrorCode *status);
1408 #endif /* U_HIDE_DEPRECATED_API */
1409 
1424 U_CAPI const char * U_EXPORT2
1425 ucol_getLocaleByType(const UCollator *coll, ULocDataLocaleType type, UErrorCode *status);
1426 
1437 U_CAPI USet * U_EXPORT2
1438 ucol_getTailoredSet(const UCollator *coll, UErrorCode *status);
1439 
1440 #ifndef U_HIDE_INTERNAL_API
1441 
1452 U_CAPI int32_t U_EXPORT2
1453 ucol_getUnsafeSet( const UCollator *coll,
1454  USet *unsafe,
1455  UErrorCode *status);
1456 
1477 U_CAPI void U_EXPORT2
1478 ucol_prepareShortStringOpen( const char *definition,
1479  UBool forceDefaults,
1480  UParseError *parseError,
1481  UErrorCode *status);
1482 #endif /* U_HIDE_INTERNAL_API */
1483 
1495 U_CAPI int32_t U_EXPORT2
1496 ucol_cloneBinary(const UCollator *coll,
1497  uint8_t *buffer, int32_t capacity,
1498  UErrorCode *status);
1499 
1517 U_CAPI UCollator* U_EXPORT2
1518 ucol_openBinary(const uint8_t *bin, int32_t length,
1519  const UCollator *base,
1520  UErrorCode *status);
1521 
1522 
1523 #endif /* #if !UCONFIG_NO_COLLATION */
1524 
1525 #endif
"Smart pointer" class, closes a UCollator via ucol_close().
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:59
Characters with the currency property.
Definition: ucol.h:197
string a < string b
Definition: ucol.h:82
Turn the feature on - works for UCOL_FRENCH_COLLATION, UCOL_CASE_LEVEL, UCOL_HIRAGANA_QUATERNARY_MODE...
Definition: ucol.h:118
Characters with the symbol property.
Definition: ucol.h:191
U_CAPI UCollator * ucol_open(const char *loc, UErrorCode *status)
Open a UCollator for comparing strings.
U_CAPI UEnumeration * ucol_getKeywords(UErrorCode *status)
Create a string enumerator of all possible keywords that are relevant to collation.
U_CAPI 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.
U_CAPI UCollationResult ucol_strcoll(const UCollator *coll, const UChar *source, int32_t sourceLength, const UChar *target, int32_t targetLength)
Compare two strings.
Retrieves the "UCA rules" concatenated with the tailoring rules.
Definition: ucol.h:386
A special reordering code that is used to specify all other codes used for reordering except for the ...
Definition: ucol.h:167
U_CAPI 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.
U_CAPI 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.
U_CAPI uint32_t ucol_getVariableTop(const UCollator *coll, UErrorCode *status)
Gets the variable top value of a Collator.
U_CAPI 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...
upper bound that will match all the strings that have the same initial substring as the given string ...
Definition: ucol.h:1077
#define U_CAPI
This is used to declare a function as a public ICU C API.
Definition: umachine.h:110
One more than the highest normal UColAttributeValue value.
Definition: ucol.h:136
lower bound
Definition: ucol.h:1073
U_CAPI int32_t ucol_countAvailable(void)
Determine how many locales have collation rules available.
U_CAPI const char * ucol_getAvailable(int32_t localeIndex)
Get a locale for which collation rules are available.
Controls the ordering of upper and lower case letters.
Definition: ucol.h:278
UCollationResult
UCOL_LESS is returned if source string is compared to be less than target string in the ucol_strcoll(...
Definition: ucol.h:76
Retrieves the tailoring rules only.
Definition: ucol.h:378
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.
Valid for UCOL_ALTERNATE_HANDLING.
Definition: ucol.h:123
Controls whether the normalization check and necessary normalizations are performed.
Definition: ucol.h:302
struct UEnumeration UEnumeration
structure representing an enumeration object instance
Definition: uenum.h:44
U_CAPI UColAttributeValue ucol_getAttribute(const UCollator *coll, UColAttribute attr, UErrorCode *status)
Universal attribute getter.
U_CAPI 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.
U_CAPI void ucol_getUCAVersion(const UCollator *coll, UVersionInfo info)
Gets the UCA version information for a Collator.
C API for code unit iteration.
Definition: uiter.h:341
accepted by most attributes
Definition: ucol.h:94
string a == string b
Definition: ucol.h:78
UColAttributeValue UCollationStrength
Base letter represents a primary difference.
Definition: ucol.h:239
U_CAPI int32_t ucol_getRulesEx(const UCollator *coll, UColRuleOption delta, UChar *buffer, int32_t bufferLen)
Returns current rules.
U_CAPI 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...
Characters with the digit property.
Definition: ucol.h:203
U_CAPI UCollationStrength ucol_getStrength(const UCollator *coll)
Get the collation strength used in a UCollator.
Default collation strength.
Definition: ucol.h:103
U_CAPI void ucol_getVersion(const UCollator *coll, UVersionInfo info)
Gets the version information for a Collator.
U_CAPI UColReorderCode ucol_getMaxVariable(const UCollator *coll)
Returns the maximum reordering group whose characters are affected by UCOL_ALTERNATE_HANDLING.
Valid for UCOL_CASE_FIRST - lower case sorts before upper case.
Definition: ucol.h:127
C API: Unicode Script Information.
C API: Unicode Set.
U_CAPI const UChar * ucol_getRules(const UCollator *coll, int32_t *length)
Get the collation tailoring rules from a UCollator.
UColReorderCode
Enum containing the codes for reordering segments of the collation table that are not script codes...
Definition: ucol.h:149
UColAttribute
Attributes that collation service understands.
Definition: ucol.h:245
Turn the feature off - works for UCOL_FRENCH_COLLATION, UCOL_CASE_LEVEL, UCOL_HIRAGANA_QUATERNARY_MOD...
Definition: ucol.h:114
#define U_DEPRECATED
This is used to declare a function as a deprecated public ICU C API.
Definition: umachine.h:116
U_CAPI 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...
A special reordering code that is used to specify no reordering codes.
Definition: ucol.h:160
upper bound that will match strings of exact size
Definition: ucol.h:1075
Attribute for direction of secondary weights - used in Canadian French.
Definition: ucol.h:252
The strength attribute.
Definition: ucol.h:323
U_CAPI 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.
When turned on, this attribute makes substrings of digits sort according to their numeric values...
Definition: ucol.h:356
Secondary collation strength.
Definition: ucol.h:99
#define U_DEFINE_LOCAL_OPEN_POINTER(LocalPointerClassName, Type, closeFunction)
"Smart pointer" definition macro, deletes objects via the closeFunction.
Definition: localpointer.h:550
U_CAPI void ucol_setReorderCodes(UCollator *coll, const int32_t *reorderCodes, int32_t reorderCodesLength, UErrorCode *pErrorCode)
Sets the reordering codes for this collator.
void ucol_restoreVariableTop(UCollator *coll, const uint32_t varTop, UErrorCode *status)
Sets the variable top to the specified primary weight.
When turned on, this attribute positions Hiragana before all non-ignorables on quaternary level Thi...
Definition: ucol.h:336
U_CAPI UCollator * ucol_clone(const UCollator *coll, UErrorCode *status)
Thread safe cloning operation.
Controls whether an extra case level (positioned before the third level) is generated or not...
Definition: ucol.h:289
C++ API: "Smart pointers" for use with and in ICU4C C++ code.
U_CAPI const char * ucol_getLocaleByType(const UCollator *coll, ULocDataLocaleType type, UErrorCode *status)
gets the locale name of the collator.
C API: Unicode Normalization.
int32_t ucol_getContractions(const UCollator *coll, USet *conts, UErrorCode *status)
Get a set containing the contractions defined by the collator.
U_CAPI void ucol_setStrength(UCollator *coll, UCollationStrength strength)
Set the collation strength used in a UCollator.
upper case sorts before lower case
Definition: ucol.h:129
U_CAPI int32_t ucol_getUnsafeSet(const UCollator *coll, USet *unsafe, UErrorCode *status)
Calculates the set of unsafe code points, given a collator.
The first entry in the enumeration of reordering groups.
Definition: ucol.h:179
U_CAPI 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.
U_CAPI void ucol_setMaxVariable(UCollator *coll, UColReorderCode group, UErrorCode *pErrorCode)
Sets the variable top to the top of the specified reordering group.
Tertiary collation strength.
Definition: ucol.h:101
A special reordering code that is used to specify the default reordering codes for a locale...
Definition: ucol.h:155
const char * ucol_getLocale(const UCollator *coll, ULocDataLocaleType type, UErrorCode *status)
gets the locale name of the collator.
U_CAPI 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.
char16_t UChar
The base type for UTF-16 code units and pointers.
Definition: umachine.h:386
U_CAPI void ucol_close(UCollator *coll)
Close a UCollator.
string a > string b
Definition: ucol.h:80
C API: Parse Error Information.
int32_t ucol_normalizeShortDefinitionString(const char *source, char *destination, int32_t capacity, UParseError *parseError, UErrorCode *status)
Verifies and normalizes short definition string.
U_CAPI 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, thus filling up the cache.
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.
U_CAPI int32_t ucol_cloneBinary(const UCollator *coll, uint8_t *buffer, int32_t capacity, UErrorCode *status)
Creates a binary image of a collator.
U_CAPI void ucol_setAttribute(UCollator *coll, UColAttribute attr, UColAttributeValue value, UErrorCode *status)
Universal attribute setter.
One more than the highest normal UColBoundMode value.
Definition: ucol.h:1083
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.
Definition: utypes.h:415
ULocDataLocaleType
Constants for *_getLocale() Allow user to select whether she wants information on requested...
Definition: uloc.h:338
struct USet USet
USet is the C API type corresponding to C++ class UnicodeSet.
Definition: uset.h:50
U_CAPI void ucol_getContractionsAndExpansions(const UCollator *coll, USet *contractions, USet *expansions, UBool addPrefixes, UErrorCode *status)
Get a set containing the expansions defined by the collator.
U_CAPI UCollationResult ucol_strcollIter(const UCollator *coll, UCharIterator *sIter, UCharIterator *tIter, UErrorCode *status)
Compare two UTF-8 encoded strings.
Characters with the punctuation property.
Definition: ucol.h:185
UColBoundMode
enum that is taken by ucol_getBound API See below for explanation do not change the values assigned ...
Definition: ucol.h:1071
U_CAPI UBool ucol_equal(const UCollator *coll, const UChar *source, int32_t sourceLength, const UChar *target, int32_t targetLength)
Compare two strings for equality.
struct UCollator UCollator
structure representing a collator object instance
Definition: ucol.h:61
U_CAPI 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.
Valid for UCOL_ALTERNATE_HANDLING.
Definition: ucol.h:121
A UParseError struct is used to returned detailed information about parsing errors.
Definition: parseerr.h:58
UCollator * ucol_safeClone(const UCollator *coll, void *stackBuffer, int32_t *pBufferSize, UErrorCode *status)
Thread safe cloning operation.
Basic definitions for ICU, for both C and C++ APIs.
Identical collation strength.
Definition: ucol.h:108
UCollator * ucol_openFromShortString(const char *definition, UBool forceDefaults, UParseError *parseError, UErrorCode *status)
Open a collator defined by a short form string.
Quaternary collation strength.
Definition: ucol.h:106
Attribute for handling variable elements.
Definition: ucol.h:266
An alias for UCOL_NORMALIZATION_MODE attribute.
Definition: ucol.h:306
U_CAPI 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.
UColAttributeValue
Enum containing attribute values for controlling collation behavior.
Definition: ucol.h:92
U_CAPI 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.
U_CAPI UEnumeration * ucol_openAvailableLocales(UErrorCode *status)
Create a string enumerator of all locales for which a valid collator may be opened.
Characters with the space property.
Definition: ucol.h:173
UColRuleOption
Options for retrieving the rule string.
Definition: ucol.h:372
One more than the highest normal UColAttribute value.
Definition: ucol.h:365
U_CAPI int32_t ucol_getReorderCodes(const UCollator *coll, int32_t *dest, int32_t destCapacity, UErrorCode *pErrorCode)
Retrieves the reordering codes for this collator.
Primary collation strength.
Definition: ucol.h:97
U_CAPI int32_t ucol_getDisplayName(const char *objLoc, const char *dispLoc, UChar *result, int32_t resultLength, UErrorCode *status)
Get the display name for a UCollator.
int8_t UBool
The ICU boolean type, a signed-byte integer.
Definition: umachine.h:247
One more than the highest normal UColReorderCode value.
Definition: ucol.h:209
C API: Locale ID functionality similar to C++ class Locale.
U_CAPI USet * ucol_getTailoredSet(const UCollator *coll, UErrorCode *status)
Get a Unicode set that contains all the characters and sequences tailored in this collator...