Browse Source

* Added SameStr, for symmetry and consistency with SameText (bug ID 29821)

git-svn-id: trunk@33238 -
michael 9 years ago
parent
commit
671416959d
2 changed files with 7 additions and 0 deletions
  1. 6 0
      rtl/objpas/sysutils/sysstr.inc
  2. 1 0
      rtl/objpas/sysutils/sysstrh.inc

+ 6 - 0
rtl/objpas/sysutils/sysstr.inc

@@ -218,6 +218,12 @@ begin
  Result:=CompareText(S1,S2)=0;
 end;
 
+function SameStr(const s1,s2:String):Boolean;
+
+begin
+ Result:=CompareStr(S1,S2)=0;
+end;
+
 {$ifndef FPC_NOGENERICANSIROUTINES}
 {==============================================================================}
 {   Ansi string functions                                                      }

+ 1 - 0
rtl/objpas/sysutils/sysstrh.inc

@@ -78,6 +78,7 @@ function CompareMemRange(P1, P2: Pointer; Length: PtrUInt): integer;{$ifdef SYSU
 function CompareMem(P1, P2: Pointer; Length: PtrUInt): Boolean;{$ifdef SYSUTILSINLINE}inline;{$endif}
 function CompareText(const S1, S2: string): integer;
 function SameText(const s1,s2:String):Boolean;
+function SameStr(const s1,s2:String):Boolean;
 
 function AnsiUpperCase(const s: string): string;{$ifdef SYSUTILSINLINE}inline;{$endif}
 function AnsiLowerCase(const s: string): string;{$ifdef SYSUTILSINLINE}inline;{$endif}