15 #if !UCONFIG_NO_COLLATION
23 #if U_SHOW_CPLUSPLUS_API
25 #endif // U_SHOW_CPLUSPLUS_API
104 UCOL_CE_STRENGTH_LIMIT,
131 #ifndef U_HIDE_DEPRECATED_API
204 #ifndef U_HIDE_DEPRECATED_API
314 #ifndef U_HIDE_DEPRECATED_API
350 #ifndef U_FORCE_HIDE_DEPRECATED_API
356 #endif // U_FORCE_HIDE_DEPRECATED_API
440 #ifndef U_HIDE_DEPRECATED_API
481 #ifndef U_HIDE_DEPRECATED_API
514 USet *contractions,
USet *expansions,
530 #if U_SHOW_CPLUSPLUS_API
567 int32_t sourceLength,
569 int32_t targetLength);
593 int32_t sourceLength,
595 int32_t targetLength,
614 const UChar *source, int32_t sourceLength,
615 const UChar *target, int32_t targetLength);
633 const UChar *source, int32_t sourceLength,
634 const UChar *target, int32_t targetLength);
652 const UChar *source, int32_t sourceLength,
653 const UChar *target, int32_t targetLength);
717 int32_t destCapacity,
761 const int32_t* reorderCodes,
762 int32_t reorderCodesLength,
787 int32_t destCapacity,
806 int32_t resultLength,
818 U_CAPI const char* U_EXPORT2
832 #if !UCONFIG_NO_SERVICE
926 const char* keyword,
const char* locale,
941 #ifndef U_HIDE_DEPRECATED_API
1022 const UChar *source,
1023 int32_t sourceLength,
1025 int32_t resultLength);
1052 uint8_t *dest, int32_t count,
1069 #ifndef U_HIDE_DEPRECATED_API
1117 int32_t sourceLength,
1119 uint32_t noOfLevels,
1121 int32_t resultLength,
1194 const uint8_t *src2, int32_t src2Length,
1195 uint8_t *dest, int32_t destCapacity);
1254 #ifndef U_HIDE_DEPRECATED_API
1277 const UChar *varTop, int32_t len,
1294 #ifndef U_HIDE_DEPRECATED_API
1339 int32_t *pBufferSize,
1342 #ifndef U_HIDE_DEPRECATED_API
1347 #define U_COL_SAFECLONE_BUFFERSIZE 1
1369 #ifndef U_HIDE_DEPRECATED_API
1402 U_CAPI const char * U_EXPORT2
1418 #ifndef U_HIDE_INTERNAL_API
1457 UBool forceDefaults,
1475 uint8_t *buffer, int32_t capacity,
"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.
Characters with the currency property.
Turn the feature on - works for UCOL_FRENCH_COLLATION, UCOL_CASE_LEVEL, UCOL_HIRAGANA_QUATERNARY_MODE...
Characters with the symbol property.
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.
A special reordering code that is used to specify all other codes used for reordering except for the ...
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 ...
#define U_CAPI
This is used to declare a function as a public ICU C API.
One more than the highest normal UColAttributeValue value.
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.
UCollationResult
UCOL_LESS is returned if source string is compared to be less than target string in the ucol_strcoll(...
Retrieves the tailoring rules only.
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.
Controls whether the normalization check and necessary normalizations are performed.
struct UEnumeration UEnumeration
structure representing an enumeration object instance
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.
accepted by most attributes
UColAttributeValue UCollationStrength
Base letter represents a primary difference.
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.
U_CAPI UCollationStrength ucol_getStrength(const UCollator *coll)
Get the collation strength used in a UCollator.
Default collation strength.
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.
C API: Unicode Script Information.
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...
UColAttribute
Attributes that collation service understands.
Turn the feature off - works for UCOL_FRENCH_COLLATION, UCOL_CASE_LEVEL, UCOL_HIRAGANA_QUATERNARY_MOD...
#define U_DEPRECATED
This is used to declare a function as a deprecated public ICU C API.
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.
U_CAPI UCollator * ucol_safeClone(const UCollator *coll, void *stackBuffer, int32_t *pBufferSize, UErrorCode *status)
Thread safe cloning operation.
upper bound that will match strings of exact size
Attribute for direction of secondary weights - used in Canadian French.
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...
Secondary collation strength.
#define U_DEFINE_LOCAL_OPEN_POINTER(LocalPointerClassName, Type, closeFunction)
"Smart pointer" definition macro, deletes objects via the closeFunction.
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 This ...
Controls whether an extra case level (positioned before the third level) is generated or not...
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
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.
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.
A special reordering code that is used to specify the default reordering codes for a locale...
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.
U_CAPI void ucol_close(UCollator *coll)
Close a UCollator.
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.
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.
ULocDataLocaleType
Constants for *_getLocale() Allow user to select whether she wants information on requested...
struct USet USet
USet is the C API type corresponding to C++ class UnicodeSet.
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 trings.
Characters with the punctuation property.
UColBoundMode
enum that is taken by ucol_getBound API See below for explanation do not change the values assigned t...
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
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.
A UParseError struct is used to returned detailed information about parsing errors.
Basic definitions for ICU, for both C and C++ APIs.
Identical collation strength.
UCollator * ucol_openFromShortString(const char *definition, UBool forceDefaults, UParseError *parseError, UErrorCode *status)
Open a collator defined by a short form string.
Quaternary collation strength.
Attribute for handling variable elements.
An alias for UCOL_NORMALIZATION_MODE attribute.
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.
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.
UColRuleOption
Options for retrieving the rule string.
One more than the highest normal UColAttribute value.
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.
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.
One more than the highest normal UColReorderCode value.
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...