Changeset 186 for trunk/Forms/UFormCheck.pas
- Timestamp:
- Jul 11, 2018, 3:34:11 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormCheck.pas
r185 r186 7 7 uses 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, 9 ExtCtrls, ComCtrls, UAcronym, URegistry, Registry ;9 ExtCtrls, ComCtrls, UAcronym, URegistry, Registry, UCommon; 10 10 11 11 type … … 49 49 function SearchLine(Lines: TStrings; Text: string; Start: Integer = 0): Integer; 50 50 function SearchLineReverse(Lines: TStrings; Text: string; Start: Integer = -1): Integer; 51 function PosFromIndex(SubStr: string; Text: string; StartIndex: Integer): Integer;52 function PosFromIndexReverse(SubStr: string; Text: string; StartIndex: Integer): Integer;53 51 procedure FindInSummary; 54 52 procedure FindInContent; … … 173 171 else Result := Start; 174 172 while (Result >= 0) and (Pos(Text, Lines[Result]) = 0) do Dec(Result); 175 end;176 177 function TFormCheck.PosFromIndex(SubStr: string; Text: string;178 StartIndex: Integer): Integer;179 begin180 Delete(Text, 1, StartIndex);181 Result := Pos(SubStr, Text);182 if Result <> 0 then Result := Result + StartIndex;183 end;184 185 function TFormCheck.PosFromIndexReverse(SubStr: string; Text: string;186 StartIndex: Integer): Integer;187 begin188 Delete(Text, StartIndex + 1, Length(Text));189 Result := LastDelimiter(SubStr, Text);190 173 end; 191 174
Note:
See TracChangeset
for help on using the changeset viewer.