19 #ifndef __NORMALIZER2_H__
20 #define __NORMALIZER2_H__
29 #if U_SHOW_CPLUSPLUS_API
31 #if !UCONFIG_NO_NORMALIZATION
161 getNFKCCasefoldInstance(
UErrorCode &errorCode);
185 getInstance(
const char *packageName,
203 normalize(src, result, errorCode);
357 getCombiningClass(
UChar32 c)
const;
512 norm2(n2), set(filterSet) {}
750 normalizeUTF8(uint32_t options,
const char *src, int32_t length,
767 #endif // !UCONFIG_NO_NORMALIZATION
771 #endif // __NORMALIZER2_H__
virtual UBool isNormalizedUTF8(StringPiece s, UErrorCode &errorCode) const
Tests if the UTF-8 string is normalized.
virtual UBool getRawDecomposition(UChar32 c, UnicodeString &decomposition) const
Gets the raw decomposition mapping of c.
virtual UBool hasBoundaryBefore(UChar32 c) const =0
Tests if the character always has a normalization boundary before it, regardless of context...
#define U_OVERRIDE
Defined to the C++11 "override" keyword if available.
UnicodeString normalize(const UnicodeString &src, UErrorCode &errorCode) const
Returns the normalized form of the source string.
virtual UChar32 composePair(UChar32 a, UChar32 b) const
Performs pairwise composition of a & b and returns the composite if there is one. ...
virtual int32_t spanQuickCheckYes(const UnicodeString &s, UErrorCode &errorCode) const =0
Returns the end of the normalized substring of the input string.
A ByteSink can be filled with bytes.
Records lengths of string edits but not replacement text.
C++ API: StringPiece: Read-only byte string wrapper class.
virtual UnicodeString & append(UnicodeString &first, const UnicodeString &second, UErrorCode &errorCode) const =0
Appends the second string to the first string (merging them at the boundary) and returns the first st...
Unicode normalization functionality for standard Unicode normalization or for using custom mapping ta...
C API: New API for Unicode Normalization.
virtual UBool hasBoundaryAfter(UChar32 c) const =0
Tests if the character always has a normalization boundary after it, regardless of context...
int32_t UChar32
Define UChar32 as a type for single Unicode code points.
FilteredNormalizer2(const Normalizer2 &n2, const UnicodeSet &filterSet)
Constructs a filtered normalizer wrapping any Normalizer2 instance and a filter set.
A mutable set of Unicode characters and multicharacter strings.
USetSpanCondition
Argument values for whether span() and similar functions continue while the current character is cont...
virtual UNormalizationCheckResult quickCheck(const UnicodeString &s, UErrorCode &errorCode) const =0
Tests if the string is normalized.
UNormalization2Mode
Constants for normalization modes.
virtual UnicodeString & normalizeSecondAndAppend(UnicodeString &first, const UnicodeString &second, UErrorCode &errorCode) const =0
Appends the normalized form of the second string to the first string (merging them at the boundary) a...
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.
virtual UBool isNormalized(const UnicodeString &s, UErrorCode &errorCode) const =0
Tests if the string is normalized.
virtual UBool getDecomposition(UChar32 c, UnicodeString &decomposition) const =0
Gets the decomposition mapping of c.
virtual uint8_t getCombiningClass(UChar32 c) const
Gets the combining class of c.
Basic definitions for ICU, for both C and C++ APIs.
virtual UBool isInert(UChar32 c) const =0
Tests if the character is normalization-inert.
#define U_COMMON_API
Set to export library symbols from inside the common library, and to import them from outside...
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
A string-like object that points to a sized piece of memory.
UObject is the common ICU "boilerplate" class.
Normalization filtered by a UnicodeSet.
UNormalizationCheckResult
Result values for normalization quick check functions.
virtual void normalizeUTF8(uint32_t options, StringPiece src, ByteSink &sink, Edits *edits, UErrorCode &errorCode) const
Normalizes a UTF-8 string and optionally records how source substrings relate to changed and unchange...
int8_t UBool
The ICU boolean type, a signed-byte integer.