+// Case folded UText Iterator helper class.
+// Wraps a UText, provides a case-folded enumeration over its contents.
+// Used in implementing case insensitive matching constructs.
+// Implementation in rematch.cpp
+
+class CaseFoldingUTextIterator: public UMemory {
+ public:
+ CaseFoldingUTextIterator(UText &text);
+ ~CaseFoldingUTextIterator();
+
+ UChar32 next(); // Next case folded character
+
+ UBool inExpansion(); // True if last char returned from next() and the
+ // next to be returned both originated from a string
+ // folding of the same code point from the orignal UText.
+ private:
+ UText &fUText;
+ const UCaseProps *fcsp;
+ const UChar *fFoldChars;
+ int32_t fFoldLength;
+ int32_t fFoldIndex;
+
+};
+
+
+// Case folded UChar * string iterator.
+// Wraps a UChar *, provides a case-folded enumeration over its contents.
+// Used in implementing case insensitive matching constructs.
+// Implementation in rematch.cpp
+
+class CaseFoldingUCharIterator: public UMemory {
+ public:
+ CaseFoldingUCharIterator(const UChar *chars, int64_t start, int64_t limit);
+ ~CaseFoldingUCharIterator();
+
+ UChar32 next(); // Next case folded character
+
+ UBool inExpansion(); // True if last char returned from next() and the
+ // next to be returned both originated from a string
+ // folding of the same code point from the orignal UText.
+
+ int64_t getIndex(); // Return the current input buffer index.
+
+ private:
+ const UChar *fChars;
+ int64_t fIndex;
+ int64_t fLimit;
+ const UCaseProps *fcsp;
+ const UChar *fFoldChars;
+ int32_t fFoldLength;
+ int32_t fFoldIndex;
+
+};
+