Overview | Methods | This Package | All Packages
Searches the RichEdit control for a specified string.
Syntax
public int find( String string )
public int find( String string, int options )
public int find( String string, int start, int options )
public int find( String string, int start, int end, int options )
Parameters
string
The string to locate in the control.
options
One or more flags that specify how to search for the text. This value can be a logical OR combination of one or more of the enumeration constants defined in the RichEditFind class. If you call a version of find that does not include this parameter, a default value of RichEditFind.NONE is used.
start
The offset at which to begin searching. If you call a version of find that does not include this parameter, a default value of 0 is used.
end
The offset at which to stop searching. If you call a version of find that does not include this parameter, the method searches to the end of the text in the control.
Return Value
Returns the zero-based offset at which the search string occurs. If the string does not appear in the control, this method returns -1.
Exceptions
WFCInvalidEnumException thrown if the options parameter specifies values that are not defined in the RichEditFind class.