Go to the documentation of this file.
17 #if U_SHOW_CPLUSPLUS_API
24 #if !UCONFIG_NO_COLLATION && !UCONFIG_NO_BREAK_ITERATION
StringSearch(const UnicodeString &pattern, CharacterIterator &text, RuleBasedCollator *coll, BreakIterator *breakiter, UErrorCode &status)
Creating a StringSearch instance using the argument collator language rule set.
The BreakIterator class implements methods for finding the location of boundaries in text.
SearchIterator is an abstract base class that provides methods to search for a pattern within a text ...
Basic definitions for ICU, for both C and C++ APIs.
StringSearch(const UnicodeString &pattern, CharacterIterator &text, const Locale &locale, BreakIterator *breakiter, UErrorCode &status)
Creating a StringSearch instance using the argument locale language rule set.
int8_t UBool
The ICU boolean type.
virtual int32_t handlePrev(int32_t position, UErrorCode &status)
Search backward for matching text, starting at a given location.
C++ API: Collation Element Iterator.
StringSearch(const UnicodeString &pattern, const UnicodeString &text, RuleBasedCollator *coll, BreakIterator *breakiter, UErrorCode &status)
Creating a StringSearch instance using the argument collator language rule set.
void setPattern(const UnicodeString &pattern, UErrorCode &status)
Sets the pattern used for matching.
C++ API: The RuleBasedCollator class implements the Collator abstract base class.
virtual ~StringSearch(void)
Destructor.
StringSearch is a SearchIterator that provides language-sensitive text searching based on the compari...
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.
virtual int32_t handleNext(int32_t position, UErrorCode &status)
Search forward for matching text, starting at a given location.
virtual void setOffset(int32_t position, UErrorCode &status)
Sets the index to point to the given position, and clears any state that's affected.
virtual StringSearch * safeClone() const
Returns a copy of StringSearch with the same behavior, and iterating over the same text,...
The RuleBasedCollator class provides the implementation of Collator, using data-driven tables.
virtual void reset()
Reset the iteration.
RuleBasedCollator * getCollator() const
Gets the collator used for the language rules.
Abstract class that defines an API for iteration on text objects.
virtual void setText(CharacterIterator &text, UErrorCode &status)
Set the target text to be searched.
StringSearch(const StringSearch &that)
Copy constructor that creates a StringSearch instance with the same behavior, and iterating over the ...
virtual UClassID getDynamicClassID() const
ICU "poor man's RTTI", returns a UClassID for the actual class.
StringSearch & operator=(const StringSearch &that)
Assignment operator.
struct UStringSearch UStringSearch
Data structure for searching.
StringSearch(const UnicodeString &pattern, const UnicodeString &text, const Locale &locale, BreakIterator *breakiter, UErrorCode &status)
Creating a StringSearch instance using the argument locale language rule set.
void setCollator(RuleBasedCollator *coll, UErrorCode &status)
Sets the collator used for the language rules.
virtual UBool operator==(const SearchIterator &that) const
Equality operator.
virtual int32_t getOffset(void) const
Return the current index in the text being searched.
virtual void setText(const UnicodeString &text, UErrorCode &status)
Set the target text to be searched.
StringSearch * clone() const
Clone this object.
const UnicodeString & getPattern() const
Gets the search pattern.
C++ API: SearchIterator object.
A Locale object represents a specific geographical, political, or cultural region.
static UClassID getStaticClassID()
ICU "poor man's RTTI", returns a UClassID for this class.