1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
function TForm_Main.RemplaceVarParSaValeur(S : String) : String;
var
retour : String;
begin
retour := s;
//'%HOST%','%ROOT%','%TITLE%','%PATH%','%VAR%','%VAR2%','%VAR3%','%UPDATE%');
retour := StringReplace(retour,'%HOST%', script_HOST, [rfReplaceAll]);
retour := StringReplace(retour,'%ROOT%', script_ROOT, [rfReplaceAll]);
retour := StringReplace(retour,'%TITLE%', script_TITLE, [rfReplaceAll]);
retour := StringReplace(retour,'%PATH%', script_PATH, [rfReplaceAll]);
retour := StringReplace(retour,'%VAR%', script_VAR, [rfReplaceAll]);
retour := StringReplace(retour,'%VAR2%', script_VAR2, [rfReplaceAll]);
retour := StringReplace(retour,'%VAR3%', script_VAR3, [rfReplaceAll]);
retour := StringReplace(retour,'%UPDATE%', script_UPDATE, [rfReplaceAll]);
retour := StringReplace(retour,'%TMP_PATH%', script_TMP_PATH, [rfReplaceAll]);
Result := retour;
end; |
Partager