diff options
author | Erich Eckner <git@eckner.net> | 2017-11-27 16:27:26 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2017-11-27 16:27:26 +0100 |
commit | d34330a23cd6c556c61b15d2d0233a67afb002bd (patch) | |
tree | cccbe717a7b053c93e19de98069d5a32309fc4e2 /lowlevelunit.pas | |
parent | 41755197f5f9f3f62e66460fe7fab5dd60662612 (diff) | |
download | units-d34330a23cd6c556c61b15d2d0233a67afb002bd.tar.xz |
lowlevelunit.pas: unterVerzeichnisRegex neu
Diffstat (limited to 'lowlevelunit.pas')
-rw-r--r-- | lowlevelunit.pas | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/lowlevelunit.pas b/lowlevelunit.pas index 1497d2c..a871145 100644 --- a/lowlevelunit.pas +++ b/lowlevelunit.pas @@ -143,6 +143,7 @@ procedure readAnAndorString(var f: file; out s: string; const len: int64; checkE procedure readAnAndorString(var f: file; out s: string; checkEOL: boolean); overload; procedure splitStrToInt(s: string; out ia: tLongintArray); +function unterVerzeichnisRegex(dateien: array of const): string; var base64Chars: array[0..63] of char; @@ -1284,6 +1285,40 @@ begin end; end; +function unterVerzeichnisRegex(dateien: array of const): string; +var + i: longint; + s: string; +begin + result:=''; + for i:=0 to length(dateien)-1 do begin + case dateien[i].vType of + vtChar: + s:=dateien[i].vChar; + vtWideChar: + s:=string(dateien[i].vWideChar); + vtString: + s:=string(dateien[i].vString); + vtPChar: + s:=dateien[i].vPChar; + vtPWideChar: + s:=dateien[i].vPWideChar; + vtAnsiString: + s:=string(dateien[i].vAnsiString); + vtWideString: + s:=string(dateien[i].vWideString); + else + fehler('unterVerzeichnisRegex Argument Nummer '+intToStr(i)+' ist kein String!'); + end{of case}; + s:=extractFilePath(s); + while rightStr(s,1)='/' do + delete(s,length(s),1); + result:=result+'|'+s; + end; + delete(result,1,1); + result:='('+result+')(/|$)'; +end; + var b: byte; |