14-06-2017, 04:00 PM
هكذا
PHP كود :
procedure Replace(const FilePath, OldName, NewName: string);
var
SL: TStringList;
begin
SL := TStringList.Create;
try
SL.LoadFromFile(FilePath);
SL.Text := StringReplace(SL.Text, OldName, NewName, [rfReplaceAll, rfIgnoreCase]);
SL.SaveToFile(FilePath);
finally
SL.Free;
end;
{
Usage:
begin
Replace('File.txt', 'ahmad', 'mhmod');
end;
}
end;
سبحان الله وبحمده سبحان الله العظيم

