You are reading help file online using chmlib.com
|
Rave Reports Developer Reference TMemoBuf. SearchFirst method |
Top Previous Next |
Declaration function SearchFirst(SearchText: string; CaseMatters: Boolean): Boolean;
Category
Description This method will start a search process, looking for SearchText from the beginning of the buffer. If CaseMatters is true then the case of the characters must match; otherwise, case will not be a factor for the match. This function will return true if it finds a match and false if it doesn't. Use SearchNext to continue the search after the first occurrence.
See also TMemoBuf Class, Pos, SearchNext
Example (Delphi) // Store the number of occurrences of 'APPLE' in apples Apples := 0; Found := MemoBuf.SearchFirst('APPLE', false); while Found do begin Inc(Apples); Found := MemoBuf.SearchNext; end; { while }
Example (C++Builder) Apples := 0; Found := MemoBuf->SearchFirst("APPLE", false); while (Found == true) { Apples++; Found = MemoBuf->SearchNext(); }/ while |
You are reading help file online using chmlib.com
|