Instance Method

searchFor:direction:caseSensitive:wrap:

Searches for a string in a given direction from the current position.

Required.

Declaration

- (BOOL)searchFor:(NSString *)string direction:(BOOL)forward caseSensitive:(BOOL)caseFlag wrap:(BOOL)wrapFlag;

Parameters

string

The string to search for.

directionFlag

If YES, the search is in the forward direction from the current location; otherwise, the search is in the backward direction.

caseFlag

If YES then the search is case sensitive; otherwise, it is not.

wrapFlag

If YES, the search continues from the end of the document to the current location; otherwise, it stops at the end of the document.

Return Value

YES if the receiver contains string in the specified direction; otherwise, NO.

Discussion

The receiver should select the string if it is found.

See Also