can u help me.
I have a code:
procedure Tpa.Button2Click(Sender: TObject);
var
Temp: TStringList;
Index: Integer;
s: Integer;
begin
Temp:= TStringList.Create();
try
for Index:= 0 to FList.Count - 1 do
if ('apple', FList[Index]) <> 0) and (Temp.IndexOf(FList[Index]) = -1)
then Temp.Add(FList[Index]);
try
begin
Temp.SaveToFile('fruits.txt');
end;
except
ShowMessage('error!');
end;
finally
Temp.Free();
end;
end;
and i need use in this button functions "Delete(Str: String; Start, Length: Integer)".I need to remove all 'garbage' after this word.
How do I do this?
example:
'apple ererewerwer'
result:
only 'apple'


Sign In
Create Account

Back to top









