(SST) ShlWAPIFunctionInfo Version 1.0

Developer Reference
TSSTAdvancedMemo.FindText Method
Attempts to locate the specified text in the text of a TMemo instance.
Public (i.e. this property can be referenced from any code, including that in other units, with access to the TSSTAdvancedMemo object of interest).
FUNCTION FindText(atexttofind : STRING; srchoptions : TSSTBasicTextSearchOptions; VAR aposfoundat : INTEGER) : INTEGER;  
atexttofind [in] A string containing the text to search for.
srchoptions [in] A record/structure of type TSSTBasicTextSearchOptions that specifies whether to restrict the search to whole words, perform a case-sensitive, and in which direction to search.
aposfoundat [out] 0-based index of the first character of the text to find, within the line in which the search text was located.
Return Values
If the function was able to find the search text, it returns the line number of the line in which the text was found. If the memo does not contain the specified text or the function was passed an invalid parameter, it returns -1.
The function only returns the first (left to right reading order) or last (?) occurrence (right to left reading order) in a line. An implementation that returns all occurrences of a search string requires considerably more code.
The WholeWordsOnly member/field of the srchoptions parameter is ignored.
Depending on the search direction specified in the srchoptions parameter the function starts searching the TMemo's text in the line immediately following or preceding the line in which the caret was positioned at the time of the call.
Unit (Declared and implemented in) SSTNewUnit.pas
Library SSTNewUnit.dcu/SSTNewUnit.obj
Unicode Implemented as ANSI version only.
See Also
TSSTAdvancedMemo, TSSTBasicTextSearchOptions, TextIndex.
Windows APIs:

Document/Contents version 1.00
Page/URI last updated on April 30, 2022
Copyright © Stoelzel Software Technologie (SST) 2010 - 2017
Suggestions and comments mail to: