Loading...
Searching...
No Matches
coll.h
Go to the documentation of this file.
// © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/*
******************************************************************************
* Copyright (C) 1996-2016, International Business Machines
* Corporation and others. All Rights Reserved.
******************************************************************************
*/
#ifndef COLL_H
#define COLL_H
#include "unicode/utypes.h"
#if U_SHOW_CPLUSPLUS_API
#if !UCONFIG_NO_COLLATION
#include <functional>
#include <string_view>
#include <type_traits>
#include "unicode/char16ptr.h"
#include "unicode/uobject.h"
#include "unicode/ucol.h"
#include "unicode/unorm.h"
#include "unicode/locid.h"
#include "unicode/uniset.h"
#include "unicode/umisc.h"
#include "unicode/unistr.h"
#include "unicode/uiter.h"
#include "unicode/stringpiece.h"
U_NAMESPACE_BEGIN
class StringEnumeration;
#if !UCONFIG_NO_SERVICE
class CollatorFactory;
#endif
class CollationKey;
class U_I18N_API Collator : public UObject {
public:
// Collator public enums -----------------------------------------------
enum ECollationStrength
{
PRIMARY = UCOL_PRIMARY, // 0
SECONDARY = UCOL_SECONDARY, // 1
TERTIARY = UCOL_TERTIARY, // 2
QUATERNARY = UCOL_QUATERNARY, // 3
IDENTICAL = UCOL_IDENTICAL // 15
};
// Cannot use #ifndef U_HIDE_DEPRECATED_API for the following, it is
// used by virtual methods that cannot have that conditional.
#ifndef U_FORCE_HIDE_DEPRECATED_API
enum EComparisonResult
{
LESS = UCOL_LESS, // -1
EQUAL = UCOL_EQUAL, // 0
GREATER = UCOL_GREATER // 1
};
#endif // U_FORCE_HIDE_DEPRECATED_API
// Collator public destructor -----------------------------------------
virtual ~Collator();
// Collator public methods --------------------------------------------
virtual bool operator==(const Collator& other) const;
virtual bool operator!=(const Collator& other) const;
virtual Collator* clone() const = 0;
static Collator* U_EXPORT2 createInstance(UErrorCode& err);
static Collator* U_EXPORT2 createInstance(const Locale& loc, UErrorCode& err);
#ifndef U_FORCE_HIDE_DEPRECATED_API
virtual EComparisonResult compare(const UnicodeString& source,
const UnicodeString& target) const;
#endif // U_FORCE_HIDE_DEPRECATED_API
virtual UCollationResult compare(const UnicodeString& source,
const UnicodeString& target,
UErrorCode &status) const = 0;
#ifndef U_FORCE_HIDE_DEPRECATED_API
virtual EComparisonResult compare(const UnicodeString& source,
const UnicodeString& target,
int32_t length) const;
#endif // U_FORCE_HIDE_DEPRECATED_API
virtual UCollationResult compare(const UnicodeString& source,
const UnicodeString& target,
int32_t length,
UErrorCode &status) const = 0;
#ifndef U_FORCE_HIDE_DEPRECATED_API
virtual EComparisonResult compare(const char16_t* source, int32_t sourceLength,
const char16_t* target, int32_t targetLength)
const;
#endif // U_FORCE_HIDE_DEPRECATED_API
virtual UCollationResult compare(const char16_t* source, int32_t sourceLength,
const char16_t* target, int32_t targetLength,
UErrorCode &status) const = 0;
virtual UCollationResult compare(UCharIterator &sIter,
UCharIterator &tIter,
UErrorCode &status) const;
virtual UCollationResult compareUTF8(const StringPiece &source,
const StringPiece &target,
UErrorCode &status) const;
virtual CollationKey& getCollationKey(const UnicodeString& source,
CollationKey& key,
UErrorCode& status) const = 0;
virtual CollationKey& getCollationKey(const char16_t*source,
int32_t sourceLength,
CollationKey& key,
UErrorCode& status) const = 0;
virtual int32_t hashCode() const = 0;
#ifndef U_FORCE_HIDE_DEPRECATED_API
virtual Locale getLocale(ULocDataLocaleType type, UErrorCode& status) const = 0;
#endif // U_FORCE_HIDE_DEPRECATED_API
UBool greater(const UnicodeString& source, const UnicodeString& target)
const;
UBool greaterOrEqual(const UnicodeString& source,
const UnicodeString& target) const;
UBool equals(const UnicodeString& source, const UnicodeString& target) const;
inline auto equal_to() const { return Predicate<std::equal_to, UCOL_EQUAL>(*this); }
inline auto greater() const { return Predicate<std::equal_to, UCOL_GREATER>(*this); }
inline auto less() const { return Predicate<std::equal_to, UCOL_LESS>(*this); }
inline auto not_equal_to() const { return Predicate<std::not_equal_to, UCOL_EQUAL>(*this); }
inline auto greater_equal() const { return Predicate<std::not_equal_to, UCOL_LESS>(*this); }
inline auto less_equal() const { return Predicate<std::not_equal_to, UCOL_GREATER>(*this); }
#ifndef U_FORCE_HIDE_DEPRECATED_API
virtual ECollationStrength getStrength() const;
virtual void setStrength(ECollationStrength newStrength);
#endif // U_FORCE_HIDE_DEPRECATED_API
virtual int32_t getReorderCodes(int32_t *dest,
int32_t destCapacity,
UErrorCode& status) const;
virtual void setReorderCodes(const int32_t* reorderCodes,
int32_t reorderCodesLength,
UErrorCode& status) ;
static int32_t U_EXPORT2 getEquivalentReorderCodes(int32_t reorderCode,
int32_t* dest,
int32_t destCapacity,
UErrorCode& status);
static UnicodeString& U_EXPORT2 getDisplayName(const Locale& objectLocale,
const Locale& displayLocale,
UnicodeString& name);
static UnicodeString& U_EXPORT2 getDisplayName(const Locale& objectLocale,
UnicodeString& name);
static const Locale* U_EXPORT2 getAvailableLocales(int32_t& count);
static StringEnumeration* U_EXPORT2 getAvailableLocales();
static StringEnumeration* U_EXPORT2 getKeywords(UErrorCode& status);
static StringEnumeration* U_EXPORT2 getKeywordValues(const char *keyword, UErrorCode& status);
static StringEnumeration* U_EXPORT2 getKeywordValuesForLocale(const char* keyword, const Locale& locale,
UBool commonlyUsed, UErrorCode& status);
static Locale U_EXPORT2 getFunctionalEquivalent(const char* keyword, const Locale& locale,
UBool& isAvailable, UErrorCode& status);
#if !UCONFIG_NO_SERVICE
static URegistryKey U_EXPORT2 registerInstance(Collator* toAdopt, const Locale& locale, UErrorCode& status);
static URegistryKey U_EXPORT2 registerFactory(CollatorFactory* toAdopt, UErrorCode& status);
static UBool U_EXPORT2 unregister(URegistryKey key, UErrorCode& status);
#endif /* UCONFIG_NO_SERVICE */
virtual void getVersion(UVersionInfo info) const = 0;
virtual UClassID getDynamicClassID() const override = 0;
virtual void setAttribute(UColAttribute attr, UColAttributeValue value,
UErrorCode &status) = 0;
virtual UColAttributeValue getAttribute(UColAttribute attr,
UErrorCode &status) const = 0;
virtual Collator &setMaxVariable(UColReorderCode group, UErrorCode &errorCode);
virtual UColReorderCode getMaxVariable() const;
#ifndef U_FORCE_HIDE_DEPRECATED_API
virtual uint32_t setVariableTop(const char16_t *varTop, int32_t len, UErrorCode &status) = 0;
virtual uint32_t setVariableTop(const UnicodeString &varTop, UErrorCode &status) = 0;
virtual void setVariableTop(uint32_t varTop, UErrorCode &status) = 0;
#endif // U_FORCE_HIDE_DEPRECATED_API
virtual uint32_t getVariableTop(UErrorCode &status) const = 0;
virtual UnicodeSet *getTailoredSet(UErrorCode &status) const;
#ifndef U_FORCE_HIDE_DEPRECATED_API
virtual Collator* safeClone() const;
#endif // U_FORCE_HIDE_DEPRECATED_API
virtual int32_t getSortKey(const UnicodeString& source,
uint8_t* result,
int32_t resultLength) const = 0;
virtual int32_t getSortKey(const char16_t*source, int32_t sourceLength,
uint8_t*result, int32_t resultLength) const = 0;
static int32_t U_EXPORT2 getBound(const uint8_t *source,
int32_t sourceLength,
UColBoundMode boundType,
uint32_t noOfLevels,
uint8_t *result,
int32_t resultLength,
UErrorCode &status);
protected:
// Collator protected constructors -------------------------------------
Collator();
#ifndef U_HIDE_DEPRECATED_API
Collator(UCollationStrength collationStrength,
UNormalizationMode decompositionMode);
#endif /* U_HIDE_DEPRECATED_API */
Collator(const Collator& other);
public:
virtual void setLocales(const Locale& requestedLocale, const Locale& validLocale, const Locale& actualLocale);
virtual int32_t internalGetShortDefinitionString(const char *locale,
char *buffer,
int32_t capacity,
UErrorCode &status) const;
virtual UCollationResult internalCompareUTF8(
const char *left, int32_t leftLength,
const char *right, int32_t rightLength,
UErrorCode &errorCode) const;
virtual int32_t
internalNextSortKeyPart(
UCharIterator *iter, uint32_t state[2],
uint8_t *dest, int32_t count, UErrorCode &errorCode) const;
#ifndef U_HIDE_INTERNAL_API
static inline Collator *fromUCollator(UCollator *uc) {
return reinterpret_cast<Collator *>(uc);
}
static inline const Collator *fromUCollator(const UCollator *uc) {
return reinterpret_cast<const Collator *>(uc);
}
inline UCollator *toUCollator() {
return reinterpret_cast<UCollator *>(this);
}
inline const UCollator *toUCollator() const {
return reinterpret_cast<const UCollator *>(this);
}
#endif // U_HIDE_INTERNAL_API
private:
Collator& operator=(const Collator& other) = delete;
friend class CFactory;
friend class SimpleCFactory;
friend class ICUCollatorFactory;
friend class ICUCollatorService;
static Collator* makeInstance(const Locale& desiredLocale,
UErrorCode& status);
template <template <typename...> typename Compare, UCollationResult result>
class Predicate {
public:
explicit Predicate(const Collator& parent) : collator(parent) {}
template <
typename T, typename U,
typename = std::enable_if_t<ConvertibleToU16StringView<T> && ConvertibleToU16StringView<U>>>
bool operator()(const T& lhs, const U& rhs) const {
UErrorCode status = U_ZERO_ERROR;
return compare(
collator.compare(
UnicodeString::readOnlyAlias(lhs),
UnicodeString::readOnlyAlias(rhs),
status),
result);
}
bool operator()(std::string_view lhs, std::string_view rhs) const {
UErrorCode status = U_ZERO_ERROR;
return compare(collator.compareUTF8(lhs, rhs, status), result);
}
#if defined(__cpp_char8_t)
bool operator()(std::u8string_view lhs, std::u8string_view rhs) const {
UErrorCode status = U_ZERO_ERROR;
return compare(collator.compareUTF8(lhs, rhs, status), result);
}
#endif
private:
const Collator& collator;
static constexpr Compare<UCollationResult> compare{};
};
};
#if !UCONFIG_NO_SERVICE
class U_I18N_API CollatorFactory : public UObject {
public:
virtual ~CollatorFactory();
virtual UBool visible() const;
virtual Collator* createCollator(const Locale& loc) = 0;
virtual UnicodeString& getDisplayName(const Locale& objectLocale,
const Locale& displayLocale,
UnicodeString& result);
virtual const UnicodeString * getSupportedIDs(int32_t &count, UErrorCode& status) = 0;
};
#endif /* UCONFIG_NO_SERVICE */
// Collator inline methods -----------------------------------------------
U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_COLLATION */
#endif /* U_SHOW_CPLUSPLUS_API */
#endif
char16ptr.h
C++ API: char16_t pointer wrappers with implicit conversion from bit-compatible raw pointer types.
icu::CollationKey
Collation keys are generated by the Collator class.
Definition sortkey.h:101
icu::CollatorFactory
A factory, used with registerFactory, the creates multiple collators and provides display names for t...
Definition coll.h:1319
icu::CollatorFactory::getSupportedIDs
virtual const UnicodeString * getSupportedIDs(int32_t &count, UErrorCode &status)=0
Return an array of all the locale names directly supported by this factory.
icu::CollatorFactory::getDisplayName
virtual UnicodeString & getDisplayName(const Locale &objectLocale, const Locale &displayLocale, UnicodeString &result)
Return the name of the collator for the objectLocale, localized for the displayLocale.
icu::CollatorFactory::visible
virtual UBool visible() const
Return true if this factory is visible.
icu::CollatorFactory::createCollator
virtual Collator * createCollator(const Locale &loc)=0
Return a collator for the provided locale.
icu::CollatorFactory::~CollatorFactory
virtual ~CollatorFactory()
Destructor.
icu::Collator
The Collator class performs locale-sensitive string comparison.
Definition coll.h:173
icu::Collator::createInstance
static Collator * createInstance(UErrorCode &err)
Creates the Collator object for the current default locale.
icu::Collator::internalCompareUTF8
virtual UCollationResult internalCompareUTF8(const char *left, int32_t leftLength, const char *right, int32_t rightLength, UErrorCode &errorCode) const
Implements ucol_strcollUTF8().
icu::Collator::registerInstance
static URegistryKey registerInstance(Collator *toAdopt, const Locale &locale, UErrorCode &status)
Register a new Collator.
icu::Collator::getStrength
virtual ECollationStrength getStrength() const
Determines the minimum strength that will be used in comparison or transformation.
icu::Collator::equals
UBool equals(const UnicodeString &source, const UnicodeString &target) const
Convenience method for comparing two strings based on the collation rules.
icu::Collator::toUCollator
UCollator * toUCollator()
Definition coll.h:1240
icu::Collator::getVersion
virtual void getVersion(UVersionInfo info) const =0
Gets the version information for a Collator.
icu::Collator::operator==
virtual bool operator==(const Collator &other) const
Returns true if "other" is the same as "this".
icu::Collator::less
auto less() const
Creates a comparison function object that uses this collator.
Definition coll.h:616
icu::Collator::getFunctionalEquivalent
static Locale getFunctionalEquivalent(const char *keyword, const Locale &locale, UBool &isAvailable, UErrorCode &status)
Return the functionally equivalent locale for the given requested locale, with respect to given keywo...
icu::Collator::getDisplayName
static UnicodeString & getDisplayName(const Locale &objectLocale, UnicodeString &name)
Get name of the object for the desired Locale, in the language of the default locale.
icu::Collator::fromUCollator
static Collator * fromUCollator(UCollator *uc)
Definition coll.h:1232
icu::Collator::getAvailableLocales
static StringEnumeration * getAvailableLocales()
Return a StringEnumeration over the locales available at the time of the call, including registered l...
icu::Collator::Collator
Collator()
Default constructor.
icu::Collator::compare
virtual EComparisonResult compare(const UnicodeString &source, const UnicodeString &target) const
The comparison function compares the character data stored in two different strings.
icu::Collator::setLocales
virtual void setLocales(const Locale &requestedLocale, const Locale &validLocale, const Locale &actualLocale)
Used internally by registration to define the requested and valid locales.
icu::Collator::less_equal
auto less_equal() const
Creates a comparison function object that uses this collator.
Definition coll.h:637
icu::Collator::setAttribute
virtual void setAttribute(UColAttribute attr, UColAttributeValue value, UErrorCode &status)=0
Universal attribute setter.
icu::Collator::getDisplayName
static UnicodeString & getDisplayName(const Locale &objectLocale, const Locale &displayLocale, UnicodeString &name)
Get name of the object for the desired Locale, in the desired language.
icu::Collator::getDynamicClassID
virtual UClassID getDynamicClassID() const override=0
Returns a unique class ID POLYMORPHICALLY.
icu::Collator::greaterOrEqual
UBool greaterOrEqual(const UnicodeString &source, const UnicodeString &target) const
Convenience method for comparing two strings based on the collation rules.
icu::Collator::getSortKey
virtual int32_t getSortKey(const UnicodeString &source, uint8_t *result, int32_t resultLength) const =0
Get the sort key as an array of bytes from a UnicodeString.
icu::Collator::compareUTF8
virtual UCollationResult compareUTF8(const StringPiece &source, const StringPiece &target, UErrorCode &status) const
Compares two UTF-8 strings using the Collator.
icu::Collator::greater
UBool greater(const UnicodeString &source, const UnicodeString &target) const
Convenience method for comparing two strings based on the collation rules.
icu::Collator::getKeywords
static StringEnumeration * getKeywords(UErrorCode &status)
Create a string enumerator of all possible keywords that are relevant to collation.
icu::Collator::getVariableTop
virtual uint32_t getVariableTop(UErrorCode &status) const =0
Gets the variable top value of a Collator.
icu::Collator::setStrength
virtual void setStrength(ECollationStrength newStrength)
Sets the minimum strength to be used in comparison or transformation.
icu::Collator::getBound
static int32_t 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.
icu::Collator::safeClone
virtual Collator * safeClone() const
Same as clone().
icu::Collator::compare
virtual UCollationResult compare(const char16_t *source, int32_t sourceLength, const char16_t *target, int32_t targetLength, UErrorCode &status) const =0
The comparison function compares the character data stored in two different string arrays.
icu::Collator::equal_to
auto equal_to() const
Creates a comparison function object that uses this collator.
Definition coll.h:602
icu::Collator::getReorderCodes
virtual int32_t getReorderCodes(int32_t *dest, int32_t destCapacity, UErrorCode &status) const
Retrieves the reordering codes for this collator.
icu::Collator::setVariableTop
virtual uint32_t setVariableTop(const UnicodeString &varTop, UErrorCode &status)=0
Sets the variable top to the primary weight of the specified string.
icu::Collator::toUCollator
const UCollator * toUCollator() const
Definition coll.h:1244
icu::Collator::ECollationStrength
ECollationStrength
Base letter represents a primary difference.
Definition coll.h:204
icu::Collator::compare
virtual UCollationResult compare(const UnicodeString &source, const UnicodeString &target, UErrorCode &status) const =0
The comparison function compares the character data stored in two different strings.
icu::Collator::compare
virtual UCollationResult compare(UCharIterator &sIter, UCharIterator &tIter, UErrorCode &status) const
Compares two strings using the Collator.
icu::Collator::getCollationKey
virtual CollationKey & getCollationKey(const UnicodeString &source, CollationKey &key, UErrorCode &status) const =0
Transforms the string into a series of characters that can be compared with CollationKey::compareTo.
icu::Collator::setMaxVariable
virtual Collator & setMaxVariable(UColReorderCode group, UErrorCode &errorCode)
Sets the variable top to the top of the specified reordering group.
icu::Collator::greater_equal
auto greater_equal() const
Creates a comparison function object that uses this collator.
Definition coll.h:630
icu::Collator::not_equal_to
auto not_equal_to() const
Creates a comparison function object that uses this collator.
Definition coll.h:623
icu::Collator::hashCode
virtual int32_t hashCode() const =0
Generates the hash code for the collation object.
icu::Collator::registerFactory
static URegistryKey registerFactory(CollatorFactory *toAdopt, UErrorCode &status)
Register a new CollatorFactory.
icu::Collator::Collator
Collator(UCollationStrength collationStrength, UNormalizationMode decompositionMode)
Constructor.
icu::Collator::getKeywordValues
static StringEnumeration * getKeywordValues(const char *keyword, UErrorCode &status)
Given a keyword, create a string enumeration of all values for that keyword that are currently in use...
icu::Collator::~Collator
virtual ~Collator()
Destructor.
icu::Collator::internalNextSortKeyPart
virtual int32_t internalNextSortKeyPart(UCharIterator *iter, uint32_t state[2], uint8_t *dest, int32_t count, UErrorCode &errorCode) const
Implements ucol_nextSortKeyPart().
icu::Collator::getCollationKey
virtual CollationKey & getCollationKey(const char16_t *source, int32_t sourceLength, CollationKey &key, UErrorCode &status) const =0
Transforms the string into a series of characters that can be compared with CollationKey::compareTo.
icu::Collator::getLocale
virtual Locale getLocale(ULocDataLocaleType type, UErrorCode &status) const =0
Gets the locale of the Collator.
icu::Collator::getAttribute
virtual UColAttributeValue getAttribute(UColAttribute attr, UErrorCode &status) const =0
Universal attribute getter.
icu::Collator::compare
virtual EComparisonResult compare(const char16_t *source, int32_t sourceLength, const char16_t *target, int32_t targetLength) const
The comparison function compares the character data stored in two different string arrays.
icu::Collator::createInstance
static Collator * createInstance(const Locale &loc, UErrorCode &err)
Gets the collation object for the desired locale.
icu::Collator::getAvailableLocales
static const Locale * getAvailableLocales(int32_t &count)
Get the set of Locales for which Collations are installed.
icu::Collator::getMaxVariable
virtual UColReorderCode getMaxVariable() const
Returns the maximum reordering group whose characters are affected by UCOL_ALTERNATE_HANDLING.
icu::Collator::getTailoredSet
virtual UnicodeSet * getTailoredSet(UErrorCode &status) const
Get a UnicodeSet that contains all the characters and sequences tailored in this collator.
icu::Collator::greater
auto greater() const
Creates a comparison function object that uses this collator.
Definition coll.h:609
icu::Collator::getSortKey
virtual int32_t getSortKey(const char16_t *source, int32_t sourceLength, uint8_t *result, int32_t resultLength) const =0
Get the sort key as an array of bytes from a char16_t buffer.
icu::Collator::EComparisonResult
EComparisonResult
LESS is returned if source string is compared to be less than target string in the compare() method.
Definition coll.h:227
icu::Collator::operator!=
virtual bool operator!=(const Collator &other) const
Returns true if "other" is not the same as "this".
icu::Collator::setReorderCodes
virtual void setReorderCodes(const int32_t *reorderCodes, int32_t reorderCodesLength, UErrorCode &status)
Sets the ordering of scripts for this collator.
icu::Collator::setVariableTop
virtual void setVariableTop(uint32_t varTop, UErrorCode &status)=0
Sets the variable top to the specified primary weight.
icu::Collator::fromUCollator
static const Collator * fromUCollator(const UCollator *uc)
Definition coll.h:1236
icu::Collator::getKeywordValuesForLocale
static StringEnumeration * getKeywordValuesForLocale(const char *keyword, const Locale &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...
icu::Collator::setVariableTop
virtual uint32_t setVariableTop(const char16_t *varTop, int32_t len, UErrorCode &status)=0
Sets the variable top to the primary weight of the specified string.
icu::Collator::compare
virtual UCollationResult compare(const UnicodeString &source, const UnicodeString &target, int32_t length, UErrorCode &status) const =0
Does the same thing as compare but limits the comparison to a specified length.
icu::Collator::unregister
static UBool unregister(URegistryKey key, UErrorCode &status)
Unregister a previously-registered Collator or CollatorFactory using the key returned from the regist...
icu::Collator::clone
virtual Collator * clone() const =0
Makes a copy of this object.
icu::Collator::Collator
Collator(const Collator &other)
Copy constructor.
icu::Collator::compare
virtual EComparisonResult compare(const UnicodeString &source, const UnicodeString &target, int32_t length) const
Does the same thing as compare but limits the comparison to a specified length.
icu::Collator::getEquivalentReorderCodes
static int32_t getEquivalentReorderCodes(int32_t reorderCode, int32_t *dest, int32_t destCapacity, UErrorCode &status)
Retrieves the reorder codes that are grouped with the given reorder code.
icu::Collator::internalGetShortDefinitionString
virtual int32_t internalGetShortDefinitionString(const char *locale, char *buffer, int32_t capacity, UErrorCode &status) const
Get the short definition string for a collator.
icu::Locale
A Locale object represents a specific geographical, political, or cultural region.
Definition locid.h:198
icu::StringEnumeration
Base class for 'pure' C++ implementations of uenum api.
Definition strenum.h:61
icu::StringPiece
A string-like object that points to a sized piece of memory.
Definition stringpiece.h:61
icu::UObject
UObject is the common ICU "boilerplate" class.
Definition uobject.h:222
icu::UnicodeSet
A mutable set of Unicode characters and multicharacter strings.
Definition uniset.h:285
icu::UnicodeString
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
Definition unistr.h:303
locid.h
C++ API: Locale ID object.
stringpiece.h
C++ API: StringPiece: Read-only byte string wrapper class.
UCharIterator
C API for code unit iteration.
Definition uiter.h:341
ucol.h
C API: Collator.
UCollator
struct UCollator UCollator
structure representing a collator object instance
Definition ucol.h:61
UColAttribute
UColAttribute
Attributes that collation service understands.
Definition ucol.h:245
UCollationStrength
UColAttributeValue UCollationStrength
Base letter represents a primary difference.
Definition ucol.h:239
UCollationResult
UCollationResult
UCOL_LESS is returned if source string is compared to be less than target string in the ucol_strcoll(...
Definition ucol.h:76
UCOL_LESS
@ UCOL_LESS
string a < string b
Definition ucol.h:82
UCOL_GREATER
@ UCOL_GREATER
string a > string b
Definition ucol.h:80
UCOL_EQUAL
@ UCOL_EQUAL
string a == string b
Definition ucol.h:78
UColBoundMode
UColBoundMode
enum that is taken by ucol_getBound API See below for explanation do not change the values assigned...
Definition ucol.h:1073
UColAttributeValue
UColAttributeValue
Enum containing attribute values for controlling collation behavior.
Definition ucol.h:92
UCOL_TERTIARY
@ UCOL_TERTIARY
Tertiary collation strength.
Definition ucol.h:101
UCOL_IDENTICAL
@ UCOL_IDENTICAL
Identical collation strength.
Definition ucol.h:108
UCOL_QUATERNARY
@ UCOL_QUATERNARY
Quaternary collation strength.
Definition ucol.h:106
UCOL_PRIMARY
@ UCOL_PRIMARY
Primary collation strength.
Definition ucol.h:97
UCOL_SECONDARY
@ UCOL_SECONDARY
Secondary collation strength.
Definition ucol.h:99
UColReorderCode
UColReorderCode
Enum containing the codes for reordering segments of the collation table that are not script codes.
Definition ucol.h:149
uiter.h
C API: Unicode Character Iteration.
ULocDataLocaleType
ULocDataLocaleType
Constants for *_getLocale() Allow user to select whether she wants information on requested,...
Definition uloc.h:338
UBool
int8_t UBool
The ICU boolean type, a signed-byte integer.
Definition umachine.h:269
umisc.h
C API: Miscellaneous definitions.
URegistryKey
const void * URegistryKey
Opaque type returned by registerInstance, registerFactory and unregister for service registration.
Definition umisc.h:57
uniset.h
C++ API: Unicode Set.
unistr.h
C++ API: Unicode String.
unorm.h
C API: Unicode Normalization.
UNormalizationMode
UNormalizationMode
Constants for normalization modes.
Definition unorm.h:140
uobject.h
C++ API: Common ICU base class UObject.
UClassID
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
Definition uobject.h:96
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
U_ZERO_ERROR
@ U_ZERO_ERROR
No error, no warning.
Definition utypes.h:544
U_I18N_API
#define U_I18N_API
Set to export library symbols from inside the i18n library, and to import them from outside.
Definition utypes.h:316
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:59