From fd7cb3056efe467d5172455fb5451e4f5a10f380 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 19 Feb 2018 09:36:06 +0100 Subject: lowlevelunit.pas: vergleicheStrings neu --- lowlevelunit.pas | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/lowlevelunit.pas b/lowlevelunit.pas index c6cfa1b..f30ca0b 100644 --- a/lowlevelunit.pas +++ b/lowlevelunit.pas @@ -151,6 +151,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 vergleicheStrings(s1,s2: string): integer; var base64Chars: array[0..63] of char; @@ -1280,6 +1281,34 @@ begin end; end; +function vergleicheStrings(s1,s2: string): integer; +var + i: longint; +begin + result:=0; + i:=1; + while (i<=length(s1)) and (i<=length(s2)) do begin + if s1[i]s2[i] then begin + result:=1; + exit; + end; + inc(i); + end; + if length(s1)length(s2) then begin + result:=1; + exit; + end; + result:=0; +end; + var b: byte; -- cgit v1.2.3-70-g09d2