diff options
author | Erich Eckner <git@eckner.net> | 2018-01-09 15:31:20 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-01-09 15:31:20 +0100 |
commit | 33f99c328d65763226f29b63731b96e696c3ca4e (patch) | |
tree | 3187d69d56ae9af752a288ea96d1d4df874eb408 | |
parent | b222ced32aadf4a46708bba9b87ed910839ce2b8 (diff) | |
download | Make-33f99c328d65763226f29b63731b96e696c3ca4e.tar.xz |
tools.pas: escape kann jetzt auch mit string escapen
-rw-r--r-- | tools.pas | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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; |