Click or drag to resize

TextSearch Methods

The TextSearch type exposes the following members.

Methods
  NameDescription
Public methodBegin
Initialize for the search process. This should be called before starting the actual search. with method run().
Public methodClose
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodGetCurrentPage
Retrieve the number of the current page that is searched in. If the returned value is -1, it indicates the search process has not been initialized (e.g., begin() is not called yet); if the returned value is 0, it indicates the search process has finished, and if the returned value is positive, it is a valid page number.
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetMode
Retrieve the current search mode.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodRun
Search the document and returns upon the following circumstances:
  • Reached the end of the document
  • Reached the end of a page (if set to return by specifying mode 'e_page_stop')
  • Found an instance matching the search pattern
Remarks
Note that this method should be called in a loop in ordre to find all matching instances; in other words, the search is conducted in an incremental fashion.
Public methodSetMode
Set the current search mode. For example, the following code turns on the regular expression: TextSearch ts = new TextSearch(); ... int mode = ts.getMode(); mode |= TextSearch.e_reg_expression; ts.setMode(mode); ...
Public methodSetPattern
Sets the current search pattern. Note that it is not necessary to call this method since the search pattern is already set when calling the begin() method. This method is provided for users to change the search pattern while searching through a document.
Public methodSetRightToLeftLanguage
Tells TextSearch that the document reads from right to left.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
See Also