summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-01-09 15:31:20 +0100
committerErich Eckner <git@eckner.net>2018-01-09 15:31:20 +0100
commit33f99c328d65763226f29b63731b96e696c3ca4e (patch)
tree3187d69d56ae9af752a288ea96d1d4df874eb408
parentb222ced32aadf4a46708bba9b87ed910839ce2b8 (diff)
downloadMake-33f99c328d65763226f29b63731b96e696c3ca4e.tar.xz
tools.pas: escape kann jetzt auch mit string escapen
-rw-r--r--tools.pas6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools.pas b/tools.pas
index 8797441..2efcb5e 100644
--- a/tools.pas
+++ b/tools.pas
@@ -45,7 +45,7 @@ function unEscapedPos(was,worin: string): longint;
procedure testeObBefehlLokal(bef, ordner: string; dateiListe: tMyStringList; lokTest: tRegExpr);
function extrahiereAlleDateien(woraus: string; dateiListe: tMyStringList): tMyStringList;
function unescape(s: string): string;
-function escape(s,toe: string; ec: char): string;
+function escape(s,toe,es: string): string;
function escapeStringToRegex(s: string; typ: tRegexTyp; extras: string = ''): string; inline;
procedure ersetzeAlleVorkommen(var worin: string; was,wodurch: string);
@@ -376,7 +376,7 @@ begin
delete(result,pos('\,',result),1);
end;
-function escape(s,toe: string; ec: char): string;
+function escape(s,toe,es: string): string;
var
i,j: longint;
b: boolean;
@@ -386,7 +386,7 @@ begin
b:=false;
for j:=1 to length(toe) do
b:=b or (toe[j]=s[i]);
- if b then result:=result+ec;
+ if b then result:=result+es;
result:=result+s[i];
end;
end;