Browse Source

* readded overload directive to lowercase
+ lowercase(<variant>);

git-svn-id: trunk@1156 -

florian 20 years ago
parent
commit
c94849ddb0
2 changed files with 9 additions and 1 deletions
  1. 5 0
      rtl/objpas/sysutils/sysstr.inc
  2. 4 1
      rtl/objpas/sysutils/sysstrh.inc

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

@@ -101,6 +101,11 @@ begin
     end;
     end;
 end;
 end;
 
 
+function LowerCase(const V: variant): string; overload;{$ifdef SYSUTILSINLINE}inline;{$endif}
+  begin
+    result:=LowerCase(ansistring(V));
+  end;
+
 
 
 {   CompareStr compares S1 and S2, the result is the based on
 {   CompareStr compares S1 and S2, the result is the based on
     substraction of the ascii values of the characters in S1 and S2
     substraction of the ascii values of the characters in S1 and S2

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

@@ -64,7 +64,10 @@ procedure DisposeStr(S: PString);
 procedure AssignStr(var P: PString; const S: string);
 procedure AssignStr(var P: PString; const S: string);
 procedure AppendStr(var Dest: String; const S: string);
 procedure AppendStr(var Dest: String; const S: string);
 function UpperCase(const s: string): string;
 function UpperCase(const s: string): string;
-function LowerCase(const s: string): string;
+function LowerCase(const s: string): string; overload;
+{ the compiler can't decide else if it should use the char or the ansistring
+  version for a variant } 
+function LowerCase(const V: variant): string; overload;{$ifdef SYSUTILSINLINE}inline;{$endif}
 function CompareStr(const S1, S2: string): Integer;
 function CompareStr(const S1, S2: string): Integer;
 function CompareMemRange(P1, P2: Pointer; Length: cardinal): integer;
 function CompareMemRange(P1, P2: Pointer; Length: cardinal): integer;
 function CompareMem(P1, P2: Pointer; Length: cardinal): Boolean;
 function CompareMem(P1, P2: Pointer; Length: cardinal): Boolean;