Go to the documentation of this file.
19 #if !UCONFIG_NO_NORMALIZATION
235 UBool compat, int32_t options,
257 UBool compat, int32_t options,
440 static inline int32_t
733 UBool nextNormalize();
734 UBool previousNormalize();
737 void clearBuffer(
void);
753 int32_t currentIndex, nextIndex;
772 return quickCheck(source, mode, 0, status);
779 return isNormalized(source, mode, 0, status);
Basic definitions for ICU, for both C and C++ APIs.
UChar32 previous(void)
Return the previous character in the normalized text and decrement.
int8_t UBool
The ICU boolean type.
void reset(void)
Reset the index to the beginning of the text.
UNormalizationMode getUMode(void) const
Return the normalization mode for this object.
static UNormalizationCheckResult quickCheck(const UnicodeString &source, UNormalizationMode mode, int32_t options, UErrorCode &status)
Performing quick check on a string; same as the other version of quickCheck but takes an extra option...
static void decompose(const UnicodeString &source, UBool compat, int32_t options, UnicodeString &result, UErrorCode &status)
Static method to decompose a UnicodeString.
U_EXPORT UBool operator==(const StringPiece &x, const StringPiece &y)
Global operator == for StringPiece.
void setText(const UnicodeString &newText, UErrorCode &status)
Set the input text over which this Normalizer will iterate.
#define U_COMMON_API
Set to export library symbols from inside the common library, and to import them from outside.
UChar32 last(void)
Return the last character in the normalized text.
int32_t length(void) const
Return the length of the UnicodeString object.
static UnicodeString & concatenate(const UnicodeString &left, const UnicodeString &right, UnicodeString &result, UNormalizationMode mode, int32_t options, UErrorCode &errorCode)
Concatenate normalized strings, making sure that the result is normalized as well.
Normalizer(const UChar *str, int32_t length, UNormalizationMode mode)
Creates a new Normalizer object for iterating over the normalized form of a given string.
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
void setIndexOnly(int32_t index)
Set the iteration position in the input text that is being normalized, without any immediate normaliz...
int32_t UChar32
Define UChar32 as a type for single Unicode code points.
void setText(const UChar *newText, int32_t length, UErrorCode &status)
Set the input text over which this Normalizer will iterate.
UObject is the common ICU "boilerplate" class.
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers,...
int32_t startIndex(void) const
Retrieve the index of the start of the input text.
void getText(UnicodeString &result)
Copies the input text into the UnicodeString argument.
void setMode(UNormalizationMode newMode)
Set the normalization mode for this object.
Normalizer(const Normalizer ©)
Copy constructor.
Unicode normalization functionality for standard Unicode normalization or for using custom mapping ta...
UChar32 current(void)
Return the current character in the normalized text.
UNormalizationMode
Constants for normalization modes.
UBool operator!=(const StringPiece &x, const StringPiece &y)
Global operator != for StringPiece.
static UClassID getStaticClassID()
ICU "poor man's RTTI", returns a UClassID for this class.
UNormalizationCheckResult
Result values for normalization quick check functions.
Normalizer(const UnicodeString &str, UNormalizationMode mode)
Creates a new Normalizer object for iterating over the normalized form of a given string.
UBool getOption(int32_t option) const
Determine whether an option is turned on or off.
Abstract class that defines an API for iteration on text objects.
int32_t hashCode(void) const
Generates a hash code for this iterator.
int32_t endIndex(void) const
Retrieve the index of the end of the input text.
C API: Unicode Normalization.
virtual UClassID getDynamicClassID() const
ICU "poor man's RTTI", returns a UClassID for the actual class.
static void compose(const UnicodeString &source, UBool compat, int32_t options, UnicodeString &result, UErrorCode &status)
Compose a UnicodeString.
Normalizer(const CharacterIterator &iter, UNormalizationMode mode)
Creates a new Normalizer object for iterating over the normalized form of the given text.
int32_t getIndex(void) const
Retrieve the current iteration position in the input text that is being normalized.
UBool operator==(const Normalizer &that) const
Returns TRUE when both iterators refer to the same character in the same input text.
C++ API: Character Iterator.
void setOption(int32_t option, UBool value)
Set options that affect this Normalizer's operation.
C++ API: New API for Unicode Normalization.
int32_t unorm_compare(const UChar *s1, int32_t length1, const UChar *s2, int32_t length2, uint32_t options, UErrorCode *pErrorCode)
Compare two strings for canonical equivalence.
uint16_t UChar
Define UChar to be UCHAR_TYPE, if that is #defined (for example, to char16_t), or wchar_t if that is ...
UChar32 first(void)
Return the first character in the normalized text.
Normalizer * clone(void) const
Returns a pointer to a new Normalizer that is a clone of this one.
C++ API: Common ICU base class UObject.
virtual ~Normalizer()
Destructor.
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
static UBool isNormalized(const UnicodeString &src, UNormalizationMode mode, int32_t options, UErrorCode &errorCode)
Test if a string is in a given normalization form; same as the other version of isNormalized but take...
The Normalizer class supports the standard normalization forms described in Unicode Standard Annex #1...
static void normalize(const UnicodeString &source, UNormalizationMode mode, int32_t options, UnicodeString &result, UErrorCode &status)
Normalizes a UnicodeString according to the specified normalization mode.
void setText(const CharacterIterator &newText, UErrorCode &status)
Set the input text over which this Normalizer will iterate.
Normalization filtered by a UnicodeSet.
UChar32 next(void)
Return the next character in the normalized text.
UChar * getBuffer(int32_t minCapacity)
Get a read/write pointer to the internal buffer.